summaryrefslogtreecommitdiff
path: root/Git
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-08-29 14:15:32 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-08-29 14:27:53 -0400
commit6a67b257f0083bb944cd132ac4a515fd4fb99a47 (patch)
treebfa9bf8c403521af9c5f939c88585c565c67b700 /Git
parent74c1d2ec3e6693adf1b2233f984059da02400feb (diff)
sync, assistant: Force push of the git-annex branch.
Necessary to ensure it gets pushed to remotes after being rewritten by forget. See inline rationalles for why I think this is safe!
Diffstat (limited to 'Git')
-rw-r--r--Git/Branch.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/Git/Branch.hs b/Git/Branch.hs
index d4a684016..fed53d767 100644
--- a/Git/Branch.hs
+++ b/Git/Branch.hs
@@ -101,3 +101,7 @@ commit message branch parentrefs repo = do
return sha
where
ps = concatMap (\r -> ["-p", show r]) parentrefs
+
+{- A leading + makes git-push force pushing a branch. -}
+forcePush :: String -> String
+forcePush b = "+" ++ b