Thread (27 messages) flat view 27 messages, 3 authors, 2016-06-15
STALE3742d

Revision rfc of 3 in this series.

Revisions (3)
  1. rfc current
  2. v1 [diff vs current]
  3. v2 [diff vs current]

[PATCH/RFC 07/20] rebase: stricter check on arguments

From: Martin von Zweigbergk <hidden>
Date: 2016-06-15 22:50:06
Subsystem: the rest · Maintainer: Linus Torvalds

To align git-rebase.sh better with git-rebase--interactive.sh, be
stricter about checking that, when used, '--continue', '--skip' and
'--abort' is the only argument.

Since $strategy and $verbose are currently saved only by interactive
rebase, checking that they are not passed on the command line would
break any existing uses of 'git rebase --strategy=<x> --continue'.
Instead, relax the check and let the options be ignored by interactive
rebase once refactored (the relaxation will not be effective until
further refactoring, however).

Signed-off-by: Martin von Zweigbergk <redacted>
---
 git-rebase.sh |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/git-rebase.sh b/git-rebase.sh
index 2358e2f..feda4be 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -317,6 +317,10 @@ test $# -gt 2 && usage
 
 if test -n "$action"
 then
+	test $# -eq 0 &&
+	test -z "$onto" &&
+	test -z "$preserve_merges" ||
+	usage
 	test -d "$merge_dir" -o -d "$apply_dir" || die "No rebase in progress?"
 else
 	# Make sure we do not have $apply_dir or $merge_dir
-- 
1.7.3.2.864.gbbb96
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help