vc-list-files: Handle git repositories, too.
authorJim Meyering <jim@meyering.net>
Tue, 25 Jul 2006 14:10:12 +0000 (14:10 +0000)
committerJim Meyering <jim@meyering.net>
Tue, 25 Jul 2006 14:10:12 +0000 (14:10 +0000)
build-aux/ChangeLog
build-aux/vc-list-files

index 0ab54c9..281057a 100644 (file)
@@ -1,3 +1,7 @@
+2006-07-25  Jim Meyering  <jim@meyering.net>
+
+       * vc-list-files: Handle git repositories, too.
+
 2006-07-19  Jim Meyering  <jim@meyering.net>
 
        * vc-list-files: Command line args correspond to an "include"
index b952466..c7c4dbd 100755 (executable)
@@ -15,7 +15,13 @@ case $# in
   *) echo "$0: too many arguments" 1>&2; exit 1 ;;
 esac
 
-if test -d .hg; then
+if test -d .git; then
+  if test "x$include_prefix" = x; then
+    git-ls-files | cut -d ' ' -f 3
+  else
+    git-ls-files | cut -d ' ' -f 3 | grep "^$include_prefix/"
+  fi
+elif test -d .hg; then
   if test "x$include_prefix" = x; then
     hg manifest | cut -d ' ' -f 3
   else