Re: bug? - git-checkout treeish paths ignores deleted files

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

 



Wincent Colaiuta wrote:
El 9/10/2007, a las 2:58, Mark Levedahl escribió:

Shouldn't "git checkout topic path" make the directory tree rooted at path identical to what is on branch topic? It doesn't.



No, the behaviour is correct.

- first you removed the file on the topic branch; at the same time you removed it from your working tree - then you switched back to the master branch and so the file was added back to your working tree - then you switched back to the topic branch, and seeing as the file "a" is not being tracked in the topic branch Git doesn't touch it

In general, Git only meddles with stuff that you've told it to track. This is actually a good thing in most cases because it makes some workflows involving dirty trees or trees with untracked content somewhat more convenient.

Cheers,
Wincent


I'm not convinced...

"git checkout branch dir" should make dir have the same value it would get if I just did "git checkout branch". The latter command will ignore files only if they are untracked in *both* HEAD and branch. I fail to see why the path-limited version of git-checkout should give a different result on the part it is asked to affect than the non-path limited version. This is very inconsistent and I'm having a hard time understanding what workflow it will help.

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

  Powered by Linux