File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 9
9
file=" $file " ' ' " $i "
10
10
shift
11
11
done
12
- test -n " $* " && range=" $* "
12
+ test -n " $* " && range=( " $@ " )
13
13
14
14
test -z " $file " && echo " file required." 1>&2 && exit 1
15
- if [ -z " $range " ]
15
+ if [ -z " ${ range[*]} " ]
16
16
then
17
17
git filter-branch -f --index-filter " git rm -r --cached " " $file " " --ignore-unmatch" \
18
18
--prune-empty --tag-name-filter cat -- --all
19
19
else
20
- # don't quote $range so that we can forward multiple rev-list arguments
20
+ # $range is an array so that we can forward multiple rev-list arguments
21
21
git filter-branch -f --index-filter " git rm -r --cached " " $file " " --ignore-unmatch" \
22
- --prune-empty --tag-name-filter cat -- " $range "
22
+ --prune-empty --tag-name-filter cat -- " ${ range[@]} "
23
23
fi
You can’t perform that action at this time.
0 commit comments