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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Michael J Gruber <git@xxxxxxxxxxxxxxxxxxxx> writes:

> Junio C Hamano venit, vidit, dixit 31.03.2011 21:26:
>> Michael J Gruber <git@xxxxxxxxxxxxxxxxxxxx> writes:
>> 
>>> 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?

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]