fix bugs in handing of deep branches with sync and adjusted branches

* sync: Previously, when run in a branch with a slash in its name,
  such as "foo/bar", the sync branch was "synced/bar". That conflicted
  with the sync branch used for branch "bar", so has been changed to
  "synced/foo/bar".
* adjust: Previously, when adjusting a branch with a slash in its name,
  such as "foo/bar", the adjusted branch was "adjusted/bar(unlocked)".
  That conflicted with the adjusted branch used for branch "bar",
  so has been changed to "adjusted/foo/bar(unlocked)"
* Also, running sync in an adjusted branch did not correctly sync
  changes back to the parent branch when it had a slash in its name.
  This bug has been fixed.

Eliminate use of Git.Ref.under and Git.Ref.basename; using
Git.Ref.underBase and Git.Ref.base make everything handle deep branches
correctly.

Probably noone was adjusting deep branches, and v6 is still experimental
anyway, so I'm not going to worry about the mess that was left by that bug.

In the case of git-annex sync, using a fixed git-annex with an old unfixed
one will mean they use different sync branches for a deep branch, and so
they may stop syncing until the old one is upgraded. However, that's only
a problem when syncing between repositories without going via a central
bare repository. Added a warning about this to the CHANGELOG, but it's
probably not going to affect many people at all.

This commit was sponsored by Riku Voipio.
This commit is contained in:
Joey Hess 2016-09-21 15:18:51 -04:00
parent 99982e2830
commit a569f195b7
No known key found for this signature in database
GPG key ID: C910D9222512E3C7
5 changed files with 24 additions and 13 deletions

View file

@ -3,4 +3,7 @@ changes to branch named "foo", but that same name is used to sync
changes to a branch named "bar/foo".
Also, the adjusted branch code uses "adjusted/foo(unlocked)" for
both "foo" and "bar/foo".
both "foo" and "bar/foo". And it fails to push changes back from there to
"bar/foo", instead creating a "foo" branch.
> [[fixed|done]] --[[Joey]]