rebase: improve error message when upstream argument is missing
commitbffd750adf98c4a377571af73cf9a589f86495fb
authorJonathan Nieder <jrnieder@gmail.com>
Mon, 31 May 2010 22:51:32 +0000 (31 17:51 -0500)
committerJunio C Hamano <gitster@pobox.com>
Tue, 1 Jun 2010 00:53:23 +0000 (31 17:53 -0700)
treea8e22d08bfebb382b058b037f47699f1a7c57997
parent81fa024cd8e336ba257f13fe7724b95baacfa3ad
rebase: improve error message when upstream argument is missing

Strip out options before checking for a missing upstream argument.
Before:

 $ git rebase -m
 shift: 426: can't shift that many

After:

 $ git rebase -m
 Usage: git rebase ...

While at it, fix the usage message to explain that the upstream
argument is mandatory.

Reported-by: Jon Dowland <jmtd@debian.org>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-rebase.sh
t/t3400-rebase.sh