Better handle filenames with * and ? in them.
This commit is contained in:
@@ -51,7 +51,7 @@ fi
|
||||
# VCS-independent way.
|
||||
IGNOREFILE=".${VCS_TYPE}ignore"
|
||||
if [[ $VCS_TYPE = 'git' ]]; then
|
||||
ignored_file="$(echo "$unencrypted_file" | sed 's/^\([!#]\)/\\\1/')"
|
||||
ignored_file="$(echo "$unencrypted_file" | sed 's/\([\*\?]\)/\\\1/g' | sed 's/^\([!#]\)/\\\1/')"
|
||||
if ! grep -Fsx >/dev/null "$ignored_file" "$IGNOREFILE"; then
|
||||
echo "$ignored_file" >>"$IGNOREFILE"
|
||||
COMMIT_FILES="$COMMIT_FILES $IGNOREFILE"
|
||||
|
||||
Reference in New Issue
Block a user