"git checkout foo" is getting confused by folder named "foo"

2013-09-24 Thread Jona Christopher Sahnwaldt
Hi, maybe this has already been reported, but I didn't find it in the mail archive. If I understand correctly, after I clone a repo, I should be able to switch to branch foo just by running git checkout foo This doesn't seem to work if a folder called "foo" exists in the root of the repo. I go

Re: "git checkout foo" is getting confused by folder named "foo"

2013-09-24 Thread David Aguilar
On Tue, Sep 24, 2013 at 2:07 PM, Jona Christopher Sahnwaldt wrote: > Hi, > > maybe this has already been reported, but I didn't find it in the mail > archive. > > If I understand correctly, after I clone a repo, I should be able to > switch to branch foo just by running > > git checkout foo > > T

Re: "git checkout foo" is getting confused by folder named "foo"

2013-09-24 Thread Keshav Kini
David Aguilar writes: > On Tue, Sep 24, 2013 at 2:07 PM, Jona Christopher Sahnwaldt > wrote: >> Hi, >> >> maybe this has already been reported, but I didn't find it in the mail >> archive. >> >> If I understand correctly, after I clone a repo, I should be able to >> switch to branch foo just by

Re: "git checkout foo" is getting confused by folder named "foo"

2013-09-24 Thread Duy Nguyen
On Wed, Sep 25, 2013 at 10:13 AM, Keshav Kini wrote: > [2] fs@erdos /tmp/extraction-framework $ git checkout wiktionary -- > fatal: invalid reference: wiktionary It may work if we demote this from fatal to error warning so the dwim logic in checkout has a chance to try differently, I thin

Re: "git checkout foo" is getting confused by folder named "foo"

2013-09-25 Thread Jona Christopher Sahnwaldt
On 25 September 2013 04:51, David Aguilar wrote: > On Tue, Sep 24, 2013 at 2:07 PM, Jona Christopher Sahnwaldt > wrote: >> Hi, >> >> maybe this has already been reported, but I didn't find it in the mail >> archive. >> >> If I understand correctly, after I clone a repo, I should be able to >> sw

Re: "git checkout foo" is getting confused by folder named "foo"

2013-09-25 Thread Matthieu Moy
Jona Christopher Sahnwaldt writes: > On 25 September 2013 04:51, David Aguilar wrote: >> On Tue, Sep 24, 2013 at 2:07 PM, Jona Christopher Sahnwaldt >> wrote: >>> Hi, >>> >>> maybe this has already been reported, but I didn't find it in the mail >>> archive. >>> >>> If I understand correctly,

Re: "git checkout foo" is getting confused by folder named "foo"

2013-09-25 Thread Jona Christopher Sahnwaldt
Hi everyone, tl;dr: The short form "git checkout foo" is a mess. There's simply too much "DWIM" magic going on. There are no comprehensible rules how it decides if "foo" is a pathspec or a refspec. On 25 September 2013 15:09, Matthieu Moy wrote: > Jona Christopher Sahnwaldt writes: > >> On 25

Re: "git checkout foo" is getting confused by folder named "foo"

2013-09-25 Thread Matthieu Moy
Jona Christopher Sahnwaldt writes: > Hi everyone, > > tl;dr: The short form "git checkout foo" is a mess. There's simply too > much "DWIM" magic going on. There are no comprehensible rules how it > decides if "foo" is a pathspec or a refspec. There is a very simple rule: What's on the left hand

Re: "git checkout foo" is getting confused by folder named "foo"

2013-09-25 Thread Jona Christopher Sahnwaldt
On 25 September 2013 21:12, Matthieu Moy wrote: > Jona Christopher Sahnwaldt writes: > >> Hi everyone, >> >> tl;dr: The short form "git checkout foo" is a mess. There's simply too >> much "DWIM" magic going on. There are no comprehensible rules how it >> decides if "foo" is a pathspec or a refspe

Re: "git checkout foo" is getting confused by folder named "foo"

2013-09-25 Thread Matthieu Moy
Jona Christopher Sahnwaldt writes: > Yes, I think the rules for the "short form" (the guessing when there's > no --) should be made simpler, or maybe the guessing should be dropped > altogether. I don't know. I don't know git well enough to be able to > be more specific. I just find the current b

Re: "git checkout foo" is getting confused by folder named "foo"

2013-09-26 Thread Jona Christopher Sahnwaldt
On 25 September 2013 22:01, Matthieu Moy wrote: > Jona Christopher Sahnwaldt writes: > >> Yes, I think the rules for the "short form" (the guessing when there's >> no --) should be made simpler, or maybe the guessing should be dropped >> altogether. I don't know. I don't know git well enough to b