From 51e512859abb441d4945aea91a52d60973647d78 Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Sat, 30 Apr 2016 16:22:30 +0000 Subject: [PATCH] list-cvs-files.sh: Make it work in git subdirectory, too Signed-off-by: Jan Lindemann --- scripts/list-cvs-files.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/list-cvs-files.sh b/scripts/list-cvs-files.sh index c92d383f..4a86c652 100644 --- a/scripts/list-cvs-files.sh +++ b/scripts/list-cvs-files.sh @@ -43,12 +43,13 @@ list_dirents() { if [ -d $1/CVS ]; then list_dirents_cvs $1 - elif [ -d $1/.git ]; then - list_dirents_git $1 - else + return + fi + git status >/dev/null 2>&1 || { echo "failed to list versioned files in $1: no VCS" >&2 exit 1 - fi + } + list_dirents_git $1 } set -- `getopt f "$@"`