tracking perms/ownership [was: empty directories]

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

 



On Wed, 2007-08-22 at 16:25 -0700, Linus Torvalds wrote:
> But if .gitattributes would work, you probably could introduce both full 
> permissions and ownership rules there. We read git attributes for *other* 
> reasons when checking files out _anyway_, ie we need the CRLF attribute 
> stuff, so adding ownership attributes would not be at all odd.

So here's the initial thought.  Create two new gitattributes, 'perms'
and 'ownership', which will track perms/ownership for files matching the
given pattern.

Looking at the index struct, it already has fields in it for file mode
uid and gid (woohoo!).  It looks like an addition to
builtin-update-index.c could set those fields (if the gitattribute is
set) the same way as how the execute bit is flipped with chmod_path().
I haven't found where the chmod is done at checkout/clone time, but the
question is:  If the mode, uid, and gid are stuffed in the index, will
git diff simply just work to recognize permission/ownership changes?  Is
this the right approach? What kind of merging issues will need to be
worried about?

-JE



-
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