apkgrel: pass -- to git with name of file in do_add

the name of the file can be ambiguous, as it might also be the name of a
branch. passing -- makes git look at it as a file only, and not a
potential branch.
This commit is contained in:
psykose 2022-05-13 05:48:15 +00:00 committed by Natanael Copa
parent 83f19b7fd8
commit b070451ae3
1 changed files with 1 additions and 1 deletions

View File

@ -45,7 +45,7 @@ do_add () {
local f= old= local f= old=
for f; do for f; do
[ -n "$only_clean_git" ] \ [ -n "$only_clean_git" ] \
&& [ -n "$(git diff --name-only "${f%/*}")" ] \ && [ -n "$(git diff --name-only -- "${f%/*}")" ] \
&& continue && continue
old=$(show_plain "$f") old=$(show_plain "$f")
case $old in case $old in