git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Show suggested refs when ref unknown
@ 2013-05-04  0:04 Vikrant Varma
  2013-05-04  0:04 ` [PATCH v2 1/2] help: add help_unknown_ref Vikrant Varma
  2013-05-04  0:04 ` [PATCH v2 2/2] merge: use help_unknown_ref Vikrant Varma
  0 siblings, 2 replies; 5+ messages in thread
From: Vikrant Varma @ 2013-05-04  0:04 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Ramkumar Ramachandra, Vikrant Varma

If origin/foo exists, but foo doesn't:

   $ git merge foo
   fatal: foo - not something we can merge

This patch series improves the error message. If a remote branch exists with the
same name, it now says:

     $ git merge foo
     fatal: foo - not something we can merge

     Did you mean this?
     	 origin/foo

It does this by adding a new help function, help_unknown_ref, that takes care of
printing the more friendly error message, and modifies builtin/merge.c to use it.

This function can easily be used by other operations involving refs that don't
exist instead of providing blanket failure error messages (eg. git checkout foo).

Vikrant Varma (2):
  help: add help_unknown_ref
  merge: use help_unknown_ref

 builtin/merge.c |    3 ++-
 help.c          |   50 ++++++++++++++++++++++++++++++++++++++++++++++++++
 help.h          |    5 +++++
 3 files changed, 57 insertions(+), 1 deletion(-)

-- 
1.7.10.4

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

end of thread, other threads:[~2013-05-09 21:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-04  0:04 [PATCH v2 0/2] Show suggested refs when ref unknown Vikrant Varma
2013-05-04  0:04 ` [PATCH v2 1/2] help: add help_unknown_ref Vikrant Varma
2013-05-08 22:49   ` Junio C Hamano
2013-05-09 21:04     ` Vikrant Varma
2013-05-04  0:04 ` [PATCH v2 2/2] merge: use help_unknown_ref Vikrant Varma

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).