diff options
author | Erik Skultety <eskultet@redhat.com> | 2017-07-27 13:47:23 +0200 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2017-07-27 07:16:50 -0500 |
commit | e97dce1b84ab639233ba1acdcacfbbf93c4cfbed (patch) | |
tree | ef0e9bf9cfedab799e10b88c594237299ef278e4 /build-aux/vc-list-files | |
parent | e20e345193c979bb7bfa1316ba2e2b70116b84c7 (diff) | |
download | gnulib-e97dce1b84ab639233ba1acdcacfbbf93c4cfbed.tar.gz |
vc-list-files: Adjust the script to support git worktrees
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>
Diffstat (limited to 'build-aux/vc-list-files')
-rwxr-xr-x | build-aux/vc-list-files | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/build-aux/vc-list-files b/build-aux/vc-list-files index 2d17eaf69d..ad683cc3fc 100755 --- a/build-aux/vc-list-files +++ b/build-aux/vc-list-files @@ -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'`; } |