Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH 2/3] sha1_name: Suggest commit:./file for path in subdir

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:50:57

Michael J Gruber [off-list ref] writes:
Junio C Hamano venit, vidit, dixit 31.03.2011 21:26:
quoted
Michael J Gruber [off-list ref] writes:
quoted
Currently, the "Did you mean..." message suggests "commit:fullpath"
only. Extend this to show the more convenient "commit:./file" form also.
If we were to do this, I suspect that with non-empty prefix we should only
show "./$file" form for brevity without aka.  This is a end-user facing
message and not meant to help scripts, no?
ENOPARSE
Sorry.  What I meant was to show only "$commit:./$file" (with $commit and
$file substituted appropriately so that the user can cut&paste from the
output) when we issue this advice in a subdirectory.

This is meant to be a direct and immediate advice to the user who typed it
from the command line to tell what he might meant.  It is beneficial to
teach the user that there are two different ways to spell it, and that in
different contexts one of these two ways may be easier to use over the
other way, but this is not a place to do so.

We know the context and what the user wanted to do (iow, the command is
run in a subdirectory, and we already guessed that the user probably
wanted to name the path in that subdirectory), so we already know between
two forms, ./$path_around_here form, not the $prefix/$path_around_here
form, is more appropriate, no?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help