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

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

 



Jona Christopher Sahnwaldt <jc@xxxxxxxxxxxx> 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 behavior very confusing.

It can hardly be "simpler" (in the sense "behavior that can be described
with fewer words"), but it could be tightened to be safer.

When a remote branch $foo exists, a local branch $foo does not, and a
file $foo does, then

  git checkout $foo

rather likely means "I want to use git checkout's DWIM and create local
branch $foo", but it currently means to Git "checkout file foo from the
index". It would make sense to die here, and require the use of --.

No time to write a patch for this. Any volunteer?

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
--
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]