git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git checkout with an ambiguous rev
@ 2019-10-02 12:02 Rohit Sarkar
  2019-10-02 13:28 ` Rohit Sarkar
  0 siblings, 1 reply; 2+ messages in thread
From: Rohit Sarkar @ 2019-10-02 12:02 UTC (permalink / raw)
  To: git; +Cc: rohitsarkar5398

Hi,
I was looking into writing a patch for the issue [1] where if an user has
multiple remotes each with a remote tracking branch of the same name say
xyz, 'git checkout xyz' fails with "error: pathspec 'xyz' did not match any
file(s) known to git."

This can sort of be handled by setting checkout.defaultRemote so that
the ambiguity is removed. Although when checkout.defaultRemote is not
set or there are more than 2 remotes I think it would be helpful if git
gives a message listing out the possible revs instead of the pathspec
error. What do you guys think?

[1] : https://public-inbox.org/git/CACcTrKdzVCKUR8EfwhqBQR7vWzRqTLcwRJ_r-hx3VztD=xvNuQ@mail.gmail.com/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-10-02 13:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-02 12:02 git checkout with an ambiguous rev Rohit Sarkar
2019-10-02 13:28 ` Rohit Sarkar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).