Re: [RFC PATCH] Re: Empty directories...

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

 



Nix <nix@xxxxxxxxxxxxx> writes:

> On 23 Jul 2007, David Kastrup uttered the following:
>> Nix <nix@xxxxxxxxxxxxx> writes:
>>> Actually, if we had a post-checkout hook, we could use a pre-commit
>>> hook to keep track of directory existence, permissions, et seq, and
>>> a post- checkout hook to restore them.
>>
>> Actually, tracking permissions would be cheap: one just needs to
>> replace the permission-munging macros in git with identity.  Ownership
>> -- well, that's harder.
>>
>> But my sentiment remains: git _tracks_ stuff: it notices when things
>> move around and follows them.  Statically snapshotting permissions
>> creates a layer that is quite less flexible.  The information gets
>> detached.
>
> Not if you record it in a file which is checked in in the same
> commit that is tracked, it isn't (that's what the pre-commit hook is
> for).

I have my doubts that anybody but git actually has a clue what to
snapshot when, and where to place it: don't forget that index
manipulation and committing are done at different times, and you need
not even commit all of the index.

> It's true that git won't natively have any knowledge of that data,
> but Linus has fairly effectively shown that it shouldn't have any
> such knowledge and doesn't need it.

Last time I looked, git tracked the executable bit.  For kernel
development, this is pretty much what it takes, and with colloborative
work, tracking anything but the owner permissions is going to lead to
annoying and verbose merge behavior quite a lot.  And of the owner
permissions, r and w complicate proper handling when unset.

But being able to specify other masks for applications other than
multi-site colloborative development would likely not hurt.

> Doing this *efficiently* is another matter: probably a pair of hooks
> are needed, run on pre-checkout and post-checkout: they can
> communicate so as only to fiddle permissions on things which are
> newly appeared or whose permissions have changed.
>
> Obviously because the permissions, ownerships et al aren't recorded
> in the index this will slow committing down,

It will also detach the time where the file contents and the
permissions get recorded.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum
-
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