diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-07-07 15:45:41 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-07-07 15:53:27 -0400 |
commit | deb66de37f3e590ba70c062399c659b366e1d1f6 (patch) | |
tree | b50cee1e4d6d501c34a58412fbd5c0c8689ed065 | |
parent | 6621e07eb527098d9a8bc6dd9a3576a1a27b3563 (diff) |
merge: Avoid creating the synced/master branch.
The branch needs to be created when merging from the remote in sync,
since we diff between it and the remote's sync branch. But git annex merge
should not be creating sync branches.
-rw-r--r-- | Command/Sync.hs | 11 | ||||
-rw-r--r-- | debian/changelog | 1 | ||||
-rw-r--r-- | doc/forum/annex_merge_creates___34__synced__47____42____34___branches/comment_5_39009651c3f65e2ecd225e17d157c8d8._comment | 10 |
3 files changed, 17 insertions, 5 deletions
diff --git a/Command/Sync.hs b/Command/Sync.hs index 958f034c8..403b463b0 100644 --- a/Command/Sync.hs +++ b/Command/Sync.hs @@ -194,10 +194,10 @@ mergeLocal (Just branch) = go =<< needmerge syncbranch = syncBranch branch needmerge = ifM isBareRepo ( return False - , do - unlessM (inRepo $ Git.Ref.exists syncbranch) $ - inRepo $ updateBranch syncbranch - inRepo $ Git.Branch.changed branch syncbranch + , ifM (inRepo $ Git.Ref.exists syncbranch) + ( inRepo $ Git.Branch.changed branch syncbranch + , return False + ) ) go False = stop go True = do @@ -254,7 +254,8 @@ mergeRemote remote b = ifM isBareRepo Nothing -> do branch <- inRepo Git.Branch.currentUnsafe and <$> mapM (merge Nothing) (branchlist branch) - Just thisbranch -> + Just thisbranch -> do + inRepo $ updateBranch $ syncBranch thisbranch and <$> (mapM (merge (Just thisbranch)) =<< tomerge (branchlist b)) ) where diff --git a/debian/changelog b/debian/changelog index e8264a4a9..45619ea2a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -22,6 +22,7 @@ git-annex (5.20150618) UNRELEASED; urgency=medium * On linux, pass --as-needed to linker to avoid linking with unused shared libraries including libyaml. * import: Fix failure of cross-device import on Windows. + * merge: Avoid creating the synced/master branch. -- Joey Hess <id@joeyh.name> Thu, 02 Jul 2015 12:31:14 -0400 diff --git a/doc/forum/annex_merge_creates___34__synced__47____42____34___branches/comment_5_39009651c3f65e2ecd225e17d157c8d8._comment b/doc/forum/annex_merge_creates___34__synced__47____42____34___branches/comment_5_39009651c3f65e2ecd225e17d157c8d8._comment new file mode 100644 index 000000000..488f3ae7b --- /dev/null +++ b/doc/forum/annex_merge_creates___34__synced__47____42____34___branches/comment_5_39009651c3f65e2ecd225e17d157c8d8._comment @@ -0,0 +1,10 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 5""" + date="2015-07-07T19:20:17Z" + content=""" +So, I was wrong about `git annex merge` creating the synced/master branch. + +There's no good reason for it to do that, so I've fixed it not to create +it. +"""]] |