[PATCH/RFC 07/20] rebase: stricter check on arguments
- From
Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
- Date
- Nov 25, 2010, 19:57 UTC
- Message-ID
- <1290715083-16919-8-git-send-email-martin.von.zweigbergk@gmail.com>
- In-Reply-To
- <1290715083-16919-1-git-send-email-martin.von.zweigbergk@gmail.com>
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 <martin.von.zweigbergk@gmail.com> --- 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