make sync aware of adjusted branches
So, it will pull and push the original branch, not the adjusted one. And, for merging, it will use updateAdjustedBranch (not implemented yet). Note that remaining uses of Git.Branch.current need to be checked too; for things that should act on the original branch, and not the adjusted branch.
This commit is contained in:
parent
9e1ebc2336
commit
7c20bf6e7a
8 changed files with 81 additions and 61 deletions
|
@ -31,11 +31,14 @@ base = Ref . remove "refs/heads/" . remove "refs/remotes/" . fromRef
|
|||
| prefix `isPrefixOf` s = drop (length prefix) s
|
||||
| otherwise = s
|
||||
|
||||
{- Gets the basename of any qualified ref. -}
|
||||
basename :: Ref -> Ref
|
||||
basename = Ref . reverse . takeWhile (/= '/') . reverse . fromRef
|
||||
|
||||
{- Given a directory and any ref, takes the basename of the ref and puts
|
||||
- it under the directory. -}
|
||||
under :: String -> Ref -> Ref
|
||||
under dir r = Ref $ dir ++ "/" ++
|
||||
(reverse $ takeWhile (/= '/') $ reverse $ fromRef r)
|
||||
under dir r = Ref $ dir ++ "/" ++ fromRef (basename r)
|
||||
|
||||
{- Given a directory such as "refs/remotes/origin", and a ref such as
|
||||
- refs/heads/master, yields a version of that ref under the directory,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue