summaryrefslogtreecommitdiff
path: root/Assistant/Threads/Merger.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-09-16 19:48:12 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-09-16 19:57:13 -0400
commitddacbbe79841230d6f2a19d94a63c20c857ce7cb (patch)
tree4996e41866b13da464ef5b95717f11fb54d2807c /Assistant/Threads/Merger.hs
parent6cddda4143d00e3a153d9cfbb567b11306677d11 (diff)
ensure outgoing sync pushes always succeed when repo is accessible
The fallback branches pushed to contain the uuid of the pusher, which is ugly. That's why syncing doesn't normally use this method. The merger deletes fallback branches after merging them, to contain the ugliness, and so unused doesn't look at data from these branches. (The fallback git-annex branch is left behind for now.)
Diffstat (limited to 'Assistant/Threads/Merger.hs')
-rw-r--r--Assistant/Threads/Merger.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/Assistant/Threads/Merger.hs b/Assistant/Threads/Merger.hs
index 56b0abb80..52db625cd 100644
--- a/Assistant/Threads/Merger.hs
+++ b/Assistant/Threads/Merger.hs
@@ -15,6 +15,7 @@ import qualified Annex.Branch
import qualified Git
import qualified Git.Merge
import qualified Git.Branch
+import qualified Git.Command as Git
thisThread :: ThreadName
thisThread = "Merger"
@@ -81,6 +82,11 @@ onAdd g file _
, show current
]
void $ Git.Merge.mergeNonInteractive changedbranch g
+ when ("fallback/" `isInfixOf` (show changedbranch)) $
+ void $ Git.runBool "branch"
+ [ Param "-D"
+ , Param $ show changedbranch
+ ] g
go _ = noop
equivBranches :: Git.Ref -> Git.Ref -> Bool