diff --git a/apatch b/apatch index f87e96d..c77a124 100755 --- a/apatch +++ b/apatch @@ -81,7 +81,7 @@ fi # if file exists, try to apply if [ -e "$patchpath" ]; then git apply --reject --whitespace=fix "$patchpath" || { - rejects="$(git status --porcelain | grep '\?\? .*\.rej$' | cut -c4-)" + rejects="$(git status --porcelain | grep -F '??' | grep -F '.rej' | cut -c4-)" if [ -n "$rejects" ]; then warning "$1 partially applied with rejects" for reject in $rejects; do