Re: confused about preserved permissions

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

 



On Mon, Aug 20, 2007 at 10:39:57PM +0200, David Kastrup <dak@xxxxxxx> wrote:
> > And it has permissions associated with these hashes.
> 
> No, with the files.  Think again: the link between file system and
> repository is the index, and the current index format has no
> representation for trees or directories.
> 
> So git _can't_ store any information about a _directory_, since no
> information about directories passes through the index.

If, as Jan suggested in a previous message, you introduce directories in
the index, I still don't see why you would need two entries in the tree
object...

> > (...)
> >> > 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)
> >> 
> >> Now I am sure I don't get your point.
> >
> > See what a raw tree object looks like:
> > git-cat-file tree 708453d64796eb617cb8a1602959e00356693315
> 
> Well, a tree is a container for files (which in turn consist of their
> permissions, file names, and blobs).

The question here was why the permissions are encoded with "%06o" while
the hash is packed. Anyways, it's just a boring detail.

Mike
-
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