Re: [PATCH 0/3] commit-graph: write non-split graphs as read-only
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 21, 2020, 01:17 UTC
- Message-ID
- <xmqqlfmpprhq.fsf@gitster.c.googlers.com>
- In-Reply-To
- <20200420233907.GA97996@syl.local>
Taylor Blau <me@ttaylorr.com> writes:
> * do want to respect core.sharedRepository, in which case the > current behavior of always setting split-graph permissions to '0444' > is wrong, or
Yes, I would say "always 0444" is wrong.
Show 7 quoted lines
> * we do not want to respect core.sharedRepository, in which case these > patches are doing what we want by setting all commit-graph files to > have read-only permissions. > > My hunch is that we do not want to abide by core.sharedRepository here > for the same reason that, say, loose objects are read-only. What do you > think?
I thought that adjusting perm for sharedRepository is orthogonal to the read-only vs read-write. If a file ought to be writable by the owner, we would make it group writable in a group shared repository. If a file is readable by the owner, we make sure it is readable by group in such a repository (and we do not want to flip write bit on). That happens by calling path.c::calc_shared_perm().