diff --git a/apatch b/apatch index b82ecef..c8ec0da 100755 --- a/apatch +++ b/apatch @@ -63,7 +63,7 @@ for patch in $source; do done header="" -if [ -f "$patch" ]; then +if [ -f "$patchpath" ]; then msg "patch exists, trying to extract existing message" # try to extract the original header from the patch patch_start=$(grep -En '^(diff --git|--- )' "$patchpath" | cut -d: -f1 | head -n 1) @@ -81,7 +81,7 @@ fi git apply --reject --whitespace=fix "$patchpath" || { rejects="$(git status --porcelain | grep '\?\? .*\.rej$' | cut -c4-)" if [ -n "$rejects" ]; then - warning "$patch partially applied with rejects" + warning "$1 partially applied with rejects" for reject in $rejects; do target="${reject%.rej}" msg "trying to wiggle $target" @@ -102,7 +102,7 @@ fi git add . - msg "saving patch $patch" + msg "saving patch $1" echo -n "$header" > "$patchpath" git diff --cached >> "$patchpath"