summaryrefslogtreecommitdiff
path: root/Branch.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Branch.hs')
-rw-r--r--Branch.hs9
1 files changed, 8 insertions, 1 deletions
diff --git a/Branch.hs b/Branch.hs
index 4f204929e..a43ee227b 100644
--- a/Branch.hs
+++ b/Branch.hs
@@ -11,7 +11,7 @@ module Branch (
get,
change,
commit,
- shortref
+ files
) where
import Control.Monad (unless, when, liftM)
@@ -222,3 +222,10 @@ cmdOutput cmd params = do
let rv = seq retval retval
_ <- getProcessStatus True False pid
return rv
+
+{- Lists all files on the branch. -}
+files :: Annex [FilePath]
+files = withIndexUpdate $ do
+ g <- Annex.gitRepo
+ liftIO $ Git.pipeNullSplit g
+ [Params "ls-tree --name-only -r -z", Param fullname]