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
| Andrew Morton | -mm merge plans for 2.6.23 |
| david | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Linus Torvalds | Linux 2.6.27-rc5 |
| Bart Van Assche | Integration of SCST in the mainstream Linux kernel |
git: | |
| David Miller | Re: [GIT]: Networking |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Lennert Buytenhek | [PATCH 16/39] mv643xx_eth: get rid of ETH_/ethernet_/eth_ prefixes |
