Skip to content

some fixes for help_unknown_ref()

Jeff King git 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2help_unknown_ref(): duplicate collected refnameshelp.c t/t7600-merge.sh+15 -10 replies
2/2help_unknown_ref(): check for refname ambiguityhelp.c t/t7600-merge.sh+9 -30 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] some fixes for help_unknown_ref()
Quoted 5 lines · Jeff King

But I agree we could be more helpful in the messages.

The "did you mean?" advice just blindly says "oh, you asked for X and refs/remotes/ABC/X exists, so let's suggest ABC/X", without checking for ambiguities. It should probably do this:

Here's a patch series to do that.

Quoted 3 lines

I also think the "warning: refname ... is ambiguous" message would probably be a bit more helpful if it showed _which_ candidates it found (and which one it chose!).

This series doesn't do anything for this problem, which I think is a bit more involved. I'm not planning to work on it immediately, if somebody else wants to pick it up (and I see Duy already has a response :) ).

[1/2]: help_unknown_ref(): duplicate collected refnames [2/2]: help_unknown_ref(): check for refname ambiguity

 help.c           |  8 ++++----
 t/t7600-merge.sh | 20 ++++++++++++++++++++
 2 files changed, 24 insertions(+), 4 deletions(-)

-Peff