Thread (2 messages) flat view 2 messages, 2 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:06:27PM -0700, Junio C Hamano [off-list ref] wrote:
That is almost true, but there is one factual error I need to
correct.

In-tree representation of the mode is not actually "%06o" but
just "%o".  In very early days of git, we used to have extra
leading "0" in trees (e.g. "040000"), but that is something
modern fsck even warns about.  IOW, it is not the norm.

It is represented as text because we _can_ add any number of
bits to the data later if we wanted to.  Basic tree objects that
contain only the kind of data we traditionally used will
continue to work, while trees that contain (yet to be invented)
new types that are represented with longer mode bits may of
course not be read by older tools.
(...)

That makes sense. (BTW, I must have misremembered the %06o thing,
because my script to hash random trees does use %o).

Anyways, that still doesn't say why all these permission bits are kept
while only the executable bit matters, though it must be related to
backwards compatibility of hashes.

I'd also like to head about why git-archive doesn't set permissions like
the manpage says (see my first post in the thread)

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