From f51a7283ffe021d8f9b3bfb14a9cedb37a7d15ca Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Wed, 4 Mar 2020 13:12:31 +0100 Subject: [PATCH] dashtopatch: Prevent *.patch+*.Upatch if: ==master --- bin/dashtopatch | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/bin/dashtopatch b/bin/dashtopatch index 901db5a..a70dff1 100755 --- a/bin/dashtopatch +++ b/bin/dashtopatch @@ -33,11 +33,13 @@ for elem in $(echo "$1"|tr '-' ' ');do if $compile;then make fi - if [ -e "$next".patch ];then - echo -e '/^--- /,$d\nw'|ed "$next".patch || : + if [ "$origin" != "master" ];then + if [ -e "$next".patch ];then + echo -e '/^--- /,$d\nw'|ed "$next".patch || : + fi + git diff "$base" "$next" --|diffdecvs >>"$next".patch + git diff -U9999999 --binary "$base" "$next" -- >"$next".Upatch fi - git diff "$base" "$next" --|diffdecvs >>"$next".patch - git diff -U9999999 --binary "$base" "$next" -- >"$next".Upatch if $gerrit;then cp "$next".patch dashtopatch.patch echo -e '/^--- /,$d\nw'|ed dashtopatch.patch -- 1.8.3.1