aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2022-06-24 11:39:02 -0700
committerDaniel Borkmann <daniel@iogearbox.net>2022-06-27 21:13:34 +0200
commit336fff47c3d1775eed52e2ad1dc6e318eec92d69 (patch)
tree42f9c1300738e3a948751d0fa993a69d7f0cdad9
parenteb7118d83bbfb284704eb632aa35d7492d74c01b (diff)
downloadpw-336fff47c3d1775eed52e2ad1dc6e318eec92d69.tar.gz
pw-pull: Wait for conflict resolution
Scripts can't "continue" after a merge fails, which results in extra manual labor performing the steps script would have performed. Plus I get used to the scripts, so each time I have to go back and check what the script would have done. Instead of failing pause the script until conflict is resolved. The expectation is that maintainer will open a second terminal, resolve the script and commit the merge. Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
-rwxr-xr-xpw-pull7
1 files changed, 7 insertions, 0 deletions
diff --git a/pw-pull b/pw-pull
index 4a2564b..84ed0eb 100755
--- a/pw-pull
+++ b/pw-pull
@@ -98,6 +98,13 @@ if [ ! -z "$series" ]; then
fi
git pull --stat --log --no-edit --no-ff $pull_url
+if [ $? -ne 0 ]; then
+ bold "Waiting for conflict resolution..."
+ while git status | head -5 | grep "conflicts" >/dev/null; do
+ sleep 0.25
+ done
+fi
+
merge_header=$(git show --format="%s" --no-patch)
merge_body=$(git show --format="%b" --no-patch)