diff options
author | Joey Hess <joey@kitenet.net> | 2012-09-16 23:09:08 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-09-16 23:09:08 -0400 |
commit | ba744c84a4f683e50bf4c9b8c388e3a611f7fb91 (patch) | |
tree | 5f2e3a717ae629c9cb1ca14da59d97e7e8aae366 /Git | |
parent | 2081a31fdaf8b76df6bdee82f48ec1e3105f5abe (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 'Git')
-rw-r--r-- | Git/Ref.hs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Git/Ref.hs b/Git/Ref.hs index 021dbe6cc..cfaafacef 100644 --- a/Git/Ref.hs +++ b/Git/Ref.hs @@ -49,9 +49,8 @@ sha branch repo = process <$> showref repo {- List of (refs, branches) matching a given ref spec. -} matching :: Ref -> Repo -> IO [(Ref, Branch)] -matching ref repo = do - r <- pipeRead [Param "show-ref", Param $ show ref] repo - return $ map gen (lines r) +matching ref repo = map gen . lines <$> + pipeRead [Param "show-ref", Param $ show ref] repo where gen l = let (r, b) = separate (== ' ') l in (Ref r, Ref b) |