summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-03-05 17:33:57 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-03-05 17:33:57 -0400
commit80fdfdb72bde67977da950f70a7a058f53322ba1 (patch)
tree92cbb8a03383e75b82f03a711676a6f49453d7dc
parent0de3005c648400e67ce4bfe88ac7999e56e3b56e (diff)
note current repo when prettifying uuis list
-rw-r--r--UUID.hs14
1 files changed, 9 insertions, 5 deletions
diff --git a/UUID.hs b/UUID.hs
index 67cba3031..239d373f1 100644
--- a/UUID.hs
+++ b/UUID.hs
@@ -106,13 +106,17 @@ reposWithoutUUID repos uuids = filterM unmatch repos
{- Pretty-prints a list of UUIDs -}
prettyPrintUUIDs :: [UUID] -> Annex String
prettyPrintUUIDs uuids = do
+ g <- Annex.gitRepo
+ here <- getUUID g
m <- uuidMap
- return $ unwords $ map (\u -> "\t" ++ prettify m u ++ "\n") uuids
+ return $ unwords $ map (\u -> "\t" ++ prettify m u here ++ "\n") uuids
where
- prettify m u =
- if not $ null $ findlog m u
- then u ++ " -- " ++ findlog m u
- else u
+ prettify m u here = base ++ ishere
+ where
+ base = if not $ null $ findlog m u
+ then u ++ " -- " ++ findlog m u
+ else u
+ ishere = if here == u then " <-- here" else ""
findlog m u = M.findWithDefault "" u m
{- Records a description for a uuid in the uuidLog. -}