diff options
Diffstat (limited to 'Annex/Direct.hs')
-rw-r--r-- | Annex/Direct.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Annex/Direct.hs b/Annex/Direct.hs index 495ce0d60..4a23fcc6c 100644 --- a/Annex/Direct.hs +++ b/Annex/Direct.hs @@ -286,18 +286,18 @@ setDirect wantdirect = do - this way things that show HEAD (eg shell prompts) will - hopefully show just "master". -} directBranch :: Ref -> Ref -directBranch orighead = case split "/" $ show orighead of +directBranch orighead = case split "/" $ fromRef orighead of ("refs":"heads":"annex":"direct":_) -> orighead ("refs":"heads":rest) -> Ref $ "refs/heads/annex/direct/" ++ intercalate "/" rest - _ -> Ref $ "refs/heads/" ++ show (Git.Ref.base orighead) + _ -> Ref $ "refs/heads/" ++ fromRef (Git.Ref.base orighead) {- Converts a directBranch back to the original branch. - - Any other ref is left unchanged. -} fromDirectBranch :: Ref -> Ref -fromDirectBranch directhead = case split "/" $ show directhead of +fromDirectBranch directhead = case split "/" $ fromRef directhead of ("refs":"heads":"annex":"direct":rest) -> Ref $ "refs/heads/" ++ intercalate "/" rest _ -> directhead |