From 923d0f546c4e041b22b1c1e23e53c27dc4d5f932 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 3 Mar 2016 14:13:54 -0400 Subject: push original branch, not adjusted branch --- Annex/AdjustedBranch.hs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'Annex/AdjustedBranch.hs') diff --git a/Annex/AdjustedBranch.hs b/Annex/AdjustedBranch.hs index 5a015e986..cea138f55 100644 --- a/Annex/AdjustedBranch.hs +++ b/Annex/AdjustedBranch.hs @@ -10,8 +10,10 @@ module Annex.AdjustedBranch ( OrigBranch, AdjBranch, adjustedToOriginal, + fromAdjustedBranch, enterAdjustedBranch, updateAdjustedBranch, + propigateAdjustedCommits, ) where import Annex.Common @@ -73,10 +75,11 @@ adjustedToOriginal b bs = fromRef b prefixlen = length adjustedBranchPrefix +fromAdjustedBranch :: Branch -> OrigBranch +fromAdjustedBranch b = maybe b snd (adjustedToOriginal b) + originalBranch :: Annex (Maybe OrigBranch) -originalBranch = fmap getorig <$> inRepo Git.Branch.current - where - getorig currbranch = maybe currbranch snd (adjustedToOriginal currbranch) +originalBranch = fmap fromAdjustedBranch <$> inRepo Git.Branch.current {- Enter an adjusted version of current branch (or, if already in an - adjusted version of a branch, changes the adjustment of the original @@ -173,10 +176,11 @@ updateAdjustedBranch tomerge (origbranch, adj) commitmode = recommit currbranch parent (Just commit) = do commitsha <- commitAdjustedTree (commitTree commit) parent inRepo $ Git.Branch.update currbranch commitsha + propigateAdjustedCommits origbranch adj return True recommit _ _ Nothing = return False {- Check for any commits present on the adjusted branch that have not yet - - been propigated to the master branch, and propigate them. -} + - been propigated to the orig branch, and propigate them. -} propigateAdjustedCommits :: OrigBranch -> Adjustment -> Annex () propigateAdjustedCommits originbranch adj = return () -- TODO -- cgit v1.2.3