Re: Problem with S_IFGITLINK

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

 



2011/8/24 Adam Kłobukowski <adamklobukowski@xxxxxxxxx>:
> I may try to implement it, but I my knowledge of Git internals is equal to
> zero. If someone can point me what has to be done - I'll be gratefull.

Git stores mode in the index (struct cache_entry#ce_mode, cache.h) and
in tree objects (see tree-walk.c). Basically you define a new set of
S_IS* and S_IF* macros and use them instead of standard ones.
Translations from struct stat#st_mode will be needed, I think
ce_mode_from_stat() does that job.

So:
 - read index and checkout: entry.c
 - read and update index: read-cache.c
 - read tree objects: tree-walk.c
 - write tree objects: cache-tree.c
 - anywhere that checks struct cache_entry#ce_mode needs to convert to
use the new defines

Another way, less changes, is redefine S_IS* and S_IF* and ignore
system values. Then make wrapper for stat() and lstat(), convert
system values to git values. You can put these wrappers in compat
directory. See git-compat-util.h, mingw port for example already
redefine these functions for Windows platform.
-- 
Duy
--
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]