Skip to content

Commit

Permalink
Don't treat ignored patterns as regexps
Browse files Browse the repository at this point in the history
Fixes #353.
  • Loading branch information
rkennedy committed Apr 30, 2015
1 parent 438de98 commit e2b6eaf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/git-ignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function add_patterns {
local file="${1/#~/$HOME}"
for pattern in "${@:2}"; do
echo "... adding '$pattern'"
(test -f "$file" && test "$pattern" && grep -q -- "$pattern" "$file") || echo "$pattern" >> "$file"
(test -f "$file" && test "$pattern" && grep -q -F -x -- "$pattern" "$file") || echo "$pattern" >> "$file"
done
}

Expand Down

0 comments on commit e2b6eaf

Please sign in to comment.