summaryrefslogtreecommitdiff
path: root/Annex
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-02-25 16:10:54 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-02-25 16:10:54 -0400
commitfecc1819270f3249118a2ce8599be7246e0db745 (patch)
tree2971ff1a88380b1ad87f278324fcd4a6ef9d5ed2 /Annex
parenta650aa8b43bf21388c2b5e8ebd922a52801eebd4 (diff)
add hashPointerFile'
Diffstat (limited to 'Annex')
-rw-r--r--Annex/Link.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/Annex/Link.hs b/Annex/Link.hs
index 40e56f23e..1f2830c40 100644
--- a/Annex/Link.hs
+++ b/Annex/Link.hs
@@ -123,6 +123,9 @@ hashPointerFile :: Key -> Annex Sha
hashPointerFile key = inRepo $ Git.HashObject.hashObject BlobObject $
formatPointer key
+hashPointerFile' :: Git.HashObject.HashObjectHandle -> Key -> Annex Sha
+hashPointerFile' h = liftIO . Git.HashObject.hashBlob h . formatPointer
+
{- Stages a pointer file, using a Sha of its content -}
stagePointerFile :: FilePath -> Sha -> Annex ()
stagePointerFile file sha =