summaryrefslogtreecommitdiff
path: root/Command/Unused.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-09-16 23:09:08 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-09-16 23:09:08 -0400
commitba744c84a4f683e50bf4c9b8c388e3a611f7fb91 (patch)
tree5f2e3a717ae629c9cb1ca14da59d97e7e8aae366 /Command/Unused.hs
parent2081a31fdaf8b76df6bdee82f48ec1e3105f5abe (diff)
better name for fallback sync refs
Don't expose these as branches in refs/heads/. Instead hide them away in refs/synced/ where only show-ref will find them. Make unused only look at branches and tags, not these other things, so it won't care if some stale sync ref used to use a file. This means they don't need to be deleted, which could have led to an incoming sync being missed.
Diffstat (limited to 'Command/Unused.hs')
-rw-r--r--Command/Unused.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/Command/Unused.hs b/Command/Unused.hs
index 39a7a59cf..f5eb4b7dd 100644
--- a/Command/Unused.hs
+++ b/Command/Unused.hs
@@ -251,7 +251,9 @@ withKeysReferencedInGit a = do
rs <- relevantrefs <$> showref
forM_ rs (withKeysReferencedInGitRef a)
where
- showref = inRepo $ Git.Command.pipeRead [Param "show-ref"]
+ {- List heads and tags, but not other refs used in syncing. -}
+ showref = inRepo $ Git.Command.pipeRead
+ [Param "show-ref", Param "--heads", Param "--tags"]
relevantrefs = map (Git.Ref . snd) .
nubBy uniqref .
filter ourbranches .