mirror of
https://github.com/tj/git-extras.git
synced 2026-09-10 07:26:17 -04:00
Fixes array handling for remove.
This commit is contained in:
parent
0546411c62
commit
69124b91bf
|
|
@ -124,16 +124,16 @@ _usage() {
|
|||
}
|
||||
|
||||
remove_patterns() {
|
||||
local args
|
||||
declare -a args
|
||||
local tmpfile
|
||||
args="${*:3}"
|
||||
args=( "${@:3}" )
|
||||
tmpfile="$(get_tmp_file)"
|
||||
local file="${2/#~/$HOME}"
|
||||
if [ -f "$file" ]; then
|
||||
echo "Removing patterns from $1 gitignore ($2)..."
|
||||
while read -r line; do
|
||||
local drop=
|
||||
for pattern in $args; do
|
||||
for pattern in "${args[@]}"; do
|
||||
test "$pattern" = "$line" && drop="yes"
|
||||
done
|
||||
if [ -z "$drop" ]; then
|
||||
|
|
|
|||
Loading…
Reference in a new issue