Re: [PATCH v2 1/2] help: add help_unknown_ref

2013-05-09 Thread Vikrant Varma
On Thursday 09 May 2013 04:19 AM, Junio C Hamano wrote: > [...] which in turn made me realize that some commands may not even know > if the user mistyped a ref. It is not an objection to this patch > per-se, but a useful future enhancement may be to allow the callers > call guess_mistyped_ref() d

Re: [PATCH v2 1/2] help: add help_unknown_ref

2013-05-08 Thread Junio C Hamano
Vikrant Varma writes: > When a ref is not known, currently functions call die() with an > error message. The first part read somewhat awkward, so I started rewriting the above like so: When the user gives an unknown string to a command that expects to see a ref, we could be more helpful

[PATCH v2 1/2] help: add help_unknown_ref

2013-05-03 Thread Vikrant Varma
When a ref is not known, currently functions call die() with an error message. Add helper function help_unknown_ref to take care of displaying an error message along with a list of suggested refs the user might have meant. Example: $ git merge foo merge: foo - not something we can