summaryrefslogtreecommitdiff
path: root/Annex/CatFile.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-02-25 15:34:46 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-02-25 15:34:46 -0400
commita650aa8b43bf21388c2b5e8ebd922a52801eebd4 (patch)
treed1d3e304f23ba931f9d849c6596ea21ec38136fe /Annex/CatFile.hs
parent940b980ebace955d4a33edbeee9ce0f7ac87ec33 (diff)
add catCommit
Diffstat (limited to 'Annex/CatFile.hs')
-rw-r--r--Annex/CatFile.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/Annex/CatFile.hs b/Annex/CatFile.hs
index 8de0e536c..254dafddb 100644
--- a/Annex/CatFile.hs
+++ b/Annex/CatFile.hs
@@ -10,6 +10,7 @@ module Annex.CatFile (
catFileDetails,
catObject,
catTree,
+ catCommit,
catObjectDetails,
catFileHandle,
catFileStop,
@@ -52,6 +53,11 @@ catTree ref = do
h <- catFileHandle
liftIO $ Git.CatFile.catTree h ref
+catCommit :: Git.Ref -> Annex (Maybe Commit)
+catCommit ref = do
+ h <- catFileHandle
+ liftIO $ Git.CatFile.catCommit h ref
+
catObjectDetails :: Git.Ref -> Annex (Maybe (L.ByteString, Sha, ObjectType))
catObjectDetails ref = do
h <- catFileHandle