Skip to content

Commit 68419d6

Browse files
committed
Use git am --abort to cleanup to avoid git am errors
1 parent 8c58268 commit 68419d6

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

apply-patches.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,7 @@ for f in $(cd /work/patches && find . -name '*.patch' -o -name '*.diff' | sort);
6969
# with the next patch if it succeeds.
7070
git am --3way "/work/patches/$f" && continue
7171
# Okay it failed, let's clean up and try the next option.
72-
git reset HEAD .
73-
git checkout -- .
72+
git am --abort
7473
git clean -fdx
7574
echo "=== using patch(1) to apply patch $f ==="
7675
if ! ($PATCH_CMD -p1 --no-backup-if-mismatch -V none -f -N <"/work/patches/$f" && git add .); then

cfbot_patchburner_ctl.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,7 @@ for f in $(cd /work/patches && find . -name '*.patch' -o -name '*.diff' | sort);
151151
# with the next patch if it succeeds.
152152
git am --3way "/work/patches/$f" && continue
153153
# Okay it failed, let's clean up and try the next option.
154-
git reset HEAD .
155-
git checkout -- .
154+
git am --abort
156155
git clean -fdx
157156
echo "=== using patch(1) to apply patch $f ==="
158157
if ! ($PATCH_CMD -p1 --no-backup-if-mismatch -V none -f -N <"/work/patches/$f" && git add .); then

0 commit comments

Comments
 (0)