Re: [PATCH 2/2] push: add an advice on unqualified <dst> push

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

 



On Thu, Oct 11, 2018 at 06:54:15AM +0900, Junio C Hamano wrote:

> > I'm not sure about saying "branch or tag" in the first bullet. It's
> > friendlier to most users, but less technically correct (if you said
> > "notes/foo", I believe we'd match an existing "refs/notes/foo", because
> > it's really just using the normal lookup rules).
> 
> An alternative may be "looking for a ref that matches %s on the
> remote side".  I am no longer a total newbie, so I cannot tell how
> well that message would help one to connect notes/foo one just typed
> with refs/notes/foo that potentially exists on the remote side.

Yeah. Really, it would be nice to imply that it somehow does the same
DWIM lookup that we do for local refs. But I didn't know how to say
that. Possibly we could refer to the documentation, but it's buried in
git-rev-parse.

> > Also, as an aside, I wonder if we should allow "heads/foo" to work as
> > "refs/heads/foo" (even when no such ref already exists). But that is
> > totally orthogonal to changing the message.
> 
> I am neutral on this point but agree that it is better done outside
> this patch.

Yeah, definitely. I would almost call it a leftover bit, but I think the
subtlety is not in the code, but in whether it is a good thing to be
doing (i.e., too many false positives).

-Peff



[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]

  Powered by Linux