]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
vc-list-files: Adjust the script to support git worktrees
authorErik Skultety <eskultet@redhat.com>
Thu, 27 Jul 2017 11:47:23 +0000 (13:47 +0200)
committerEric Blake <eblake@redhat.com>
Thu, 27 Jul 2017 12:16:50 +0000 (07:16 -0500)
Git's worktree feature creates a ".git" which refers to references from
the original (main) repository. This makes vc-list-files to fail for
worktrees since it checks for both file's existence and the file being a
directory. Checking for existence should be okay in this case, since the
script doesn't touch anything within ".git" directly. Instead, it
invokes git commands, which work from within a worktree nicely.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Message-Id: <0ad867fe1a1e0999e6666ef75398630f28e78e35.1501156018.git.eskultet@redhat.com>

ChangeLog
build-aux/vc-list-files

index ec8a3016d03e997364024e935e54dd8a03c07919..36dd0424edcb3de24989ad6f2f65830f60f14a2e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2017-07-27  Erik Skultety <eskultet@redhat.com>  (tiny change)
+
+       vc-list-files: Adjust the script to support git worktrees
+       * build-aux/vc-list-files: Require existence, not directory.
+
 2017-07-26  Paul Eggert  <eggert@cs.ucla.edu>
 
        doc: bring MODULES.html.sh up to date
index 2d17eaf69d509f30594883003938553b85a78e95..ad683cc3fc03c9c6b79a4ba59c476b2b1a49545c 100755 (executable)
@@ -65,7 +65,7 @@ test $# = 0 && set .
 
 for dir
 do
-  if test -d .git; then
+  if test -e .git; then
     test "x$dir" = x. \
       && dir= sed_esc= \
       || { dir="$dir/"; sed_esc=`echo "$dir"|env sed 's,\([\\/]\),\\\\\1,g'`; }