Thread (13 messages) flat view 13 messages, 8 authors, 2016-06-15

Re: confused about preserved permissions

From: Mike Hommey <hidden>
Date: 2016-06-15 22:43:30

On Mon, Aug 20, 2007 at 07:58:43PM +0200, David Kastrup [off-list ref] wrote:
quoted
I also never understood why there were no permissions set on
directories in trees...
Because directories are not actually tracked.  They are created and
deleted as-needed.
I don't see why it would prevent to have a permission set to it... the
permission technically can be recorded in the parent tree, along its
sha1. Filesystems are also like this.
In my proposal for allowing directories to get tracked, permissions of
000 would indicate a tree without a corresponding tracked directory.
Other permissions would correspond to a tracked directory.  I am still
stuck over the representation in the index.

One idea is to unconditionally have an entry "dirname" without
permissions, and optionally "dirname/" with permissions iff the
directory is supposed to be tracked, both to be sorted in
alphabetically.  The idea of the first entry is being able to detect
merge conflicts without extra passes.

But I have not worked on the stuff for a while.
I don't see why you would need an additional entry for the directory
permission.
quoted
nor why, while the sha1 for child objects are "packed", the modes
aren't...
Because a change of the mode of a file will then not cause different
sha1 sums at the file level.
I think i wasn't clear enough... I just wondered why the format for tree
entries is something like (if you'd write it in perl):
sprintf "%06o %s\0%s", $mode, $file, pack("H[40]", $sha1)

Mike
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help