From 71b036f7f12962982d9fc3eb3ea29035895e386c Mon Sep 17 00:00:00 2001 From: John Whitley Date: Fri, 29 Dec 2023 13:26:45 -0800 Subject: [PATCH] Revert change to ,gitignore.d behavior in #196 (#334) --- vcsh.in | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/vcsh.in b/vcsh.in index 6e626a35..8a2c0203 100755 --- a/vcsh.in +++ b/vcsh.in @@ -569,16 +569,11 @@ write_gitignore() { OLDIFS=$IFS IFS=$(printf '\n\t') gitignores=$(for file in $(@GIT@ ls-files); do - if [ "$GIT_VERSION_MAJOR" -ge 2 ] \ - && [ "$GIT_VERSION_MINOR" -ge 7 ]; then - echo "$file"; - else - while true; do - echo "$file"; new=${file%/*} - [ x"$file" = x"$new" ] && break - file=$new - done; - fi + while true; do + echo "$file"; new=${file%/*} + [ x"$file" = x"$new" ] && break + file=$new + done; done | sort -u) # Contrary to GNU mktemp, mktemp on BSD/OSX requires a template for temp files