Thread (1 message) 1 message, 1 author, 2021-01-28

Re: [PATCH 02/27] sparse-index: implement ensure_full_index()

From: Junio C Hamano <hidden>
Date: 2021-01-28 05:26:45

Elijah Newren [off-list ref] writes:
quoted
 1. ce->ce_mode == 01000755
This is a weird number.  What's the reason for choosing it?  It looks
deceptively close to 0100755, normal executable files, but has the
extra 0, meaning that ce->ce_mode & S_IFMT is 0, suggesting it has no
file type.

Since it's a directory, why not use S_IFDIR (040000)?

(GITLINK does use the weird 0160000 value, but it happens to be
S_IFLNK | S_IFDIR == 0120000 | 040000, which conveys "it's both a
directory and a symlink")
Yes, that combination of IFLNK/IFDIR was the reason why we use the
value.  I tend to think IFDIR is the best thing to use here.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help