From: Jim Meyering Date: Tue, 25 Jul 2006 14:10:12 +0000 (+0000) Subject: vc-list-files: Handle git repositories, too. X-Git-Tag: v6.0~105 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0ff7cb7f69a078618eb4e1553131c0206a00521a;p=thirdparty%2Fcoreutils.git vc-list-files: Handle git repositories, too. --- diff --git a/build-aux/ChangeLog b/build-aux/ChangeLog index 0ab54c96ef..281057a70e 100644 --- a/build-aux/ChangeLog +++ b/build-aux/ChangeLog @@ -1,3 +1,7 @@ +2006-07-25 Jim Meyering + + * vc-list-files: Handle git repositories, too. + 2006-07-19 Jim Meyering * vc-list-files: Command line args correspond to an "include" diff --git a/build-aux/vc-list-files b/build-aux/vc-list-files index b952466e03..c7c4dbdaf1 100755 --- a/build-aux/vc-list-files +++ b/build-aux/vc-list-files @@ -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