On Tue, 10 Apr 2007, Frank Lichtenheld wrote:So we have this strange (and worrying) dualism inside git: we use the same macros *both* for "stat data" *and* for "git-internal file modes". So sometimes a mode is the result of a [l]stat() call like above, and then a gitlink is just a directory and we use S_IFDIR. And if it comes from the index, then it uses the internal git representation, and is S_IFDIRLNK. I'm not very happy about it, but I'm actually most unhappy about it since I could imagine that the constants themselves are different on different OS's (eg VMS - a Unix-related OS will use the same constants for historical reasons). In this particular place (index-path), we obviously not only have a stat() result, but more importantly, we never come here for a "normal" directory, since a normal directory would have been expanded into its component paths by the "read_directory()" logic. So that interaction with directory expansion is somewhat non-obvious: normal directories are expanded recursively into the files they contain, while git directories end up being visible to internals as real directories, and are turned into gitlinks by code like the above. Linus - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Zhang, Yanmin | AIM7 40% regression with 2.6.26-rc1 |
| Andrew Morton | -mm merge plans for 2.6.23 |
| Linus Torvalds | Linux 2.6.27-rc5 |
git: | |
| Gerrit Renker | [PATCH 15/37] dccp: Set per-connection CCIDs via socket options |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Arjan van de Ven | Re: [GIT]: Networking |
| Natalie Protasevich | [BUG] New Kernel Bugs |
