diff options
author | Joey Hess <joey@kitenet.net> | 2014-03-03 14:57:16 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-03-03 14:57:16 -0400 |
commit | a9067868a8594577ead2ecbe55f9563bef12f26d (patch) | |
tree | 1694cea1754589a7cf0d8ed3096e03d9d430b99d /Annex/CatFile.hs | |
parent | 8d6edac6f48a4bf1522b68a30db579193c097e7a (diff) |
sync: Fix bug in direct mode that caused a file not checked into git to be deleted when merging with a remote that added a file by the same name. (Thanks, jkt)
Diffstat (limited to 'Annex/CatFile.hs')
-rw-r--r-- | Annex/CatFile.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Annex/CatFile.hs b/Annex/CatFile.hs index 87d179a62..fc722c8e7 100644 --- a/Annex/CatFile.hs +++ b/Annex/CatFile.hs @@ -7,6 +7,7 @@ module Annex.CatFile ( catFile, + catFileDetails, catObject, catTree, catObjectDetails, @@ -34,6 +35,11 @@ catFile branch file = do h <- catFileHandle liftIO $ Git.CatFile.catFile h branch file +catFileDetails :: Git.Branch -> FilePath -> Annex (Maybe (L.ByteString, Sha, ObjectType)) +catFileDetails branch file = do + h <- catFileHandle + liftIO $ Git.CatFile.catFileDetails h branch file + catObject :: Git.Ref -> Annex L.ByteString catObject ref = do h <- catFileHandle |