All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/2] rebase: give a better error message for bogus branch
@ 2011-01-27  0:27 Jeff King
  2011-01-27  1:27 ` Junio C Hamano
  0 siblings, 1 reply; 2+ messages in thread
From: Jeff King @ 2011-01-27  0:27 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

When you give a non-existent branch to git-rebase, it spits
out the usage. This can be confusing, since you may
understand the usage just fine, but simply have made a
mistake in the branch name.

Before:

  $ git rebase origin bogus
  Usage: git rebase ...

After:

  $ git rebase origin bogus
  fatal: no such branch: bogus
  Usage: git rebase ...

Signed-off-by: Jeff King <peff@peff.net>
---
 git-rebase.sh |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/git-rebase.sh b/git-rebase.sh
index 345b18c..cbb0ea9 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -482,6 +482,7 @@ case "$#" in
 	then
 		head_name="detached HEAD"
 	else
+		echo >&2 "fatal: no such branch: $1"
 		usage
 	fi
 	;;
-- 
1.7.4.rc3.5.g8354b

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 2/2] rebase: give a better error message for bogus branch
  2011-01-27  0:27 [PATCH 2/2] rebase: give a better error message for bogus branch Jeff King
@ 2011-01-27  1:27 ` Junio C Hamano
  0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2011-01-27  1:27 UTC (permalink / raw)
  To: Jeff King; +Cc: git

Thanks, both patches look very sensible.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-01-27  1:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-27  0:27 [PATCH 2/2] rebase: give a better error message for bogus branch Jeff King
2011-01-27  1:27 ` Junio C Hamano

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.