diff options
author | Joey Hess <joey@kitenet.net> | 2011-09-28 17:35:47 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-09-28 17:35:47 -0400 |
commit | b4d5c10fb71a0aa938c7dde0b9aaf57d9e793874 (patch) | |
tree | 2cc8ceb6e755e7ee80837d9becbe571ccda4f6cd /Branch.hs | |
parent | 297bc648b9a3c1b950e65f23a0e974b7934dc4dd (diff) |
refine new unused code
Fixed the laziness space leak, so it runs in 60 mb or so again. Slightly
faster due to using Data.Set.difference now, although this also makes it
use slightly more memory.
Also added display of the refs being checked, and made unused --from
also check all refs for things in the remote.
Diffstat (limited to 'Branch.hs')
-rw-r--r-- | Branch.hs | 12 |
1 files changed, 1 insertions, 11 deletions
@@ -26,7 +26,6 @@ import System.Directory import Data.String.Utils import System.Cmd.Utils import Data.Maybe -import Data.List import System.IO import System.IO.Binary import System.Posix.Process @@ -58,15 +57,6 @@ fullname = "refs/heads/" ++ name originname :: GitRef originname = "origin/" ++ name -{- Converts a fully qualified git ref into a short version for human - - consumptiom. -} -shortref :: GitRef -> String -shortref = remove "refs/heads/" . remove "refs/remotes/" - where - remove prefix s - | prefix `isPrefixOf` s = drop (length prefix) s - | otherwise = s - {- A separate index file for the branch. -} index :: Git.Repo -> FilePath index g = gitAnnexDir g </> "index" @@ -209,7 +199,7 @@ updateRef ref if null diffs then return Nothing else do - showSideAction $ "merging " ++ shortref ref ++ " into " ++ name + showSideAction $ "merging " ++ Git.refDescribe ref ++ " into " ++ name -- By passing only one ref, it is actually -- merged into the index, preserving any -- changes that may already be staged. |