summaryrefslogtreecommitdiff
path: root/Command
diff options
context:
space:
mode:
Diffstat (limited to 'Command')
-rw-r--r--Command/Log.hs2
-rw-r--r--Command/Repair.hs2
-rw-r--r--Command/Sync.hs10
-rw-r--r--Command/Uninit.hs4
-rw-r--r--Command/Unused.hs2
-rw-r--r--Command/VPop.hs3
-rw-r--r--Command/View.hs2
7 files changed, 13 insertions, 12 deletions
diff --git a/Command/Log.hs b/Command/Log.hs
index 1dd5aa51a..84583a93a 100644
--- a/Command/Log.hs
+++ b/Command/Log.hs
@@ -140,7 +140,7 @@ getLog key os = do
[ Params "log -z --pretty=format:%ct --raw --abbrev=40"
, Param "--remove-empty"
] ++ os ++
- [ Param $ show Annex.Branch.fullname
+ [ Param $ Git.fromRef Annex.Branch.fullname
, Param "--"
, Param logfile
]
diff --git a/Command/Repair.hs b/Command/Repair.hs
index c87317685..56925d83d 100644
--- a/Command/Repair.hs
+++ b/Command/Repair.hs
@@ -81,4 +81,4 @@ trackingOrSyncBranch :: Ref -> Bool
trackingOrSyncBranch b = Git.Repair.isTrackingBranch b || isAnnexSyncBranch b
isAnnexSyncBranch :: Ref -> Bool
-isAnnexSyncBranch b = "refs/synced/" `isPrefixOf` show b
+isAnnexSyncBranch b = "refs/synced/" `isPrefixOf` fromRef b
diff --git a/Command/Sync.hs b/Command/Sync.hs
index 90b9a6c79..f041b5d23 100644
--- a/Command/Sync.hs
+++ b/Command/Sync.hs
@@ -192,12 +192,12 @@ pushLocal (Just branch) = do
updateBranch :: Git.Ref -> Git.Repo -> IO ()
updateBranch syncbranch g =
- unlessM go $ error $ "failed to update " ++ show syncbranch
+ unlessM go $ error $ "failed to update " ++ Git.fromRef syncbranch
where
go = Git.Command.runBool
[ Param "branch"
, Param "-f"
- , Param $ show $ Git.Ref.base syncbranch
+ , Param $ Git.fromRef $ Git.Ref.base syncbranch
] g
pullRemote :: Remote -> Maybe Git.Ref -> CommandStart
@@ -283,15 +283,15 @@ pushBranch remote branch g = tryIO (directpush g) `after` syncpush g
, refspec branch
]
directpush = Git.Command.runQuiet $ pushparams
- [show $ Git.Ref.base $ fromDirectBranch branch]
+ [Git.fromRef $ Git.Ref.base $ fromDirectBranch branch]
pushparams branches =
[ Param "push"
, Param $ Remote.name remote
] ++ map Param branches
refspec b = concat
- [ show $ Git.Ref.base b
+ [ Git.fromRef $ Git.Ref.base b
, ":"
- , show $ Git.Ref.base $ syncBranch b
+ , Git.fromRef $ Git.Ref.base $ syncBranch b
]
commitAnnex :: CommandStart
diff --git a/Command/Uninit.hs b/Command/Uninit.hs
index 3bf6dbe00..1c8d08689 100644
--- a/Command/Uninit.hs
+++ b/Command/Uninit.hs
@@ -24,7 +24,7 @@ check :: Annex ()
check = do
b <- current_branch
when (b == Annex.Branch.name) $ error $
- "cannot uninit when the " ++ show b ++ " branch is checked out"
+ "cannot uninit when the " ++ Git.fromRef b ++ " branch is checked out"
top <- fromRepo Git.repoPath
cwd <- liftIO getCurrentDirectory
whenM ((/=) <$> liftIO (absPath top) <*> liftIO (absPath cwd)) $
@@ -77,7 +77,7 @@ finish = do
-- avoid normal shutdown
saveState False
inRepo $ Git.Command.run
- [Param "branch", Param "-D", Param $ show Annex.Branch.name]
+ [Param "branch", Param "-D", Param $ Git.fromRef Annex.Branch.name]
liftIO exitSuccess
{- Keys that were moved out of the annex have a hard link still in the
diff --git a/Command/Unused.hs b/Command/Unused.hs
index 312c26adf..d48956920 100644
--- a/Command/Unused.hs
+++ b/Command/Unused.hs
@@ -266,7 +266,7 @@ withKeysReferencedInGit a = do
map (separate (== ' ')) .
lines
nubRefs = map (Git.Ref . snd) . nubBy (\(x, _) (y, _) -> x == y)
- ourbranchend = '/' : show Annex.Branch.name
+ ourbranchend = '/' : Git.fromRef Annex.Branch.name
ourbranches (_, b) = not (ourbranchend `isSuffixOf` b)
&& not ("refs/synced/" `isPrefixOf` b)
addHead headRef refs = case headRef of
diff --git a/Command/VPop.hs b/Command/VPop.hs
index c95701580..baa52a98f 100644
--- a/Command/VPop.hs
+++ b/Command/VPop.hs
@@ -9,6 +9,7 @@ module Command.VPop where
import Common.Annex
import Command
+import qualified Git
import qualified Git.Command
import qualified Git.Ref
import Types.View
@@ -41,7 +42,7 @@ start ps = go =<< currentView
showOutput
inRepo $ Git.Command.runBool
[ Param "checkout"
- , Param $ show $ Git.Ref.base $
+ , Param $ Git.fromRef $ Git.Ref.base $
viewParentBranch v
]
sameparentbranch a b = viewParentBranch a == viewParentBranch b
diff --git a/Command/View.hs b/Command/View.hs
index 5c1742855..5895ba08f 100644
--- a/Command/View.hs
+++ b/Command/View.hs
@@ -73,7 +73,7 @@ checkoutViewBranch view mkbranch = do
showOutput
ok <- inRepo $ Git.Command.runBool
[ Param "checkout"
- , Param (show $ Git.Ref.base branch)
+ , Param (Git.fromRef $ Git.Ref.base branch)
]
when ok $ do
setView view