Thread (105 messages) flat view 105 messages, 5 authors, 2019-01-22

Re: [PATCH] git-rebase.sh: handle keep-empty like all other options

From: Phillip Wood <hidden>
Date: 2018-06-10 19:26:54

Hi Elijah
On 07/06/18 06:07, Elijah Newren wrote:
quoted hunk ↗ jump to hunk
Signed-off-by: Elijah Newren <redacted>
---
  git-rebase.sh | 6 +-----
  1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/git-rebase.sh b/git-rebase.sh
index 40be59ecc4..a56b286372 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -276,6 +276,7 @@ do
  		;;
  	--keep-empty)
  		keep_empty=yes
+		test -z "$interactive_rebase" && interactive_rebase=implied
I think you need to wait until all the options have been parsed before 
setting the implied interactive rebase in case the user specifies has 
'--keep-empty' in an alias and specifies '--no-keep-empty' with some am 
options on the command line.

Best Wishes

Phillip
quoted hunk ↗ jump to hunk
  		;;
  	--allow-empty-message)
  		allow_empty_message=--allow-empty-message
@@ -480,11 +481,6 @@ then
  	test -z "$interactive_rebase" && interactive_rebase=implied
  fi
  
-if test -n "$keep_empty"
-then
-	test -z "$interactive_rebase" && interactive_rebase=implied
-fi
-
  if test -n "$interactive_rebase"
  then
  	type=interactive
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help