diff options
author | Joey Hess <joey@kitenet.net> | 2013-08-29 14:15:32 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-08-29 14:27:53 -0400 |
commit | 6a67b257f0083bb944cd132ac4a515fd4fb99a47 (patch) | |
tree | bfa9bf8c403521af9c5f939c88585c565c67b700 /Annex | |
parent | 74c1d2ec3e6693adf1b2233f984059da02400feb (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 'Annex')
-rw-r--r-- | Annex/TaggedPush.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Annex/TaggedPush.hs b/Annex/TaggedPush.hs index 2a5f823fd..039dc0e17 100644 --- a/Annex/TaggedPush.hs +++ b/Annex/TaggedPush.hs @@ -13,6 +13,7 @@ import qualified Annex.Branch import qualified Git import qualified Git.Ref import qualified Git.Command +import qualified Git.Branch import Utility.Base64 {- Converts a git branch into a branch that is tagged with a UUID, typically @@ -49,12 +50,11 @@ fromTaggedBranch b = case split "/" $ show b of taggedPush :: UUID -> Maybe String -> Git.Ref -> Remote -> Git.Repo -> IO Bool taggedPush u info branch remote = Git.Command.runBool [ Param "push" - -- This is safe because we "own" the tagged branch we're pushing; - -- it has no other writers. Ensures it is pushed even if it has - -- been rewritten by a transition. - , Param "--force" , Param $ Remote.name remote - , Param $ refspec Annex.Branch.name + {- Using forcePush here is safe because we "own" the tagged branch + - we're pushing; it has no other writers. Ensures it is pushed + - even if it has been rewritten by a transition. -} + , Param $ Git.Branch.forcePush $ refspec Annex.Branch.name , Param $ refspec branch ] where |