From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Jonathan Tan <jonathantanmy@google.com>, git@vger.kernel.org
Subject: Re: [silly] loose, pack, and another thing?
Date: Wed, 4 Oct 2023 09:11:10 -0400 [thread overview]
Message-ID: <20231004131110.GA607079@coredump.intra.peff.net> (raw)
In-Reply-To: <xmqqo7hfwg6m.fsf@gitster.g>
On Tue, Oct 03, 2023 at 02:26:41PM -0700, Junio C Hamano wrote:
> > You can get some safety with the immutable attribute (which applies to
> > the inode itself, and thus any path that hardlinks to it). But setting
> > that usually requires being root. And it creates other irritations for
> > normal use (you have to unset it before even removing the hardlink).
>
> As a regular user, "chmod a-w" has the same characteristics (works
> at the inode level) but without "cannot remove it" downside. It
> used to be sufficient in RCS and CVS days, though, as a signal that
> you are only to look at it without touching it, to "chmod a-w" a
> path that is checked out but not for modifying. Some editors even
> offer to do chmod u+w for you when saving, so if we want absolute
> safety, it may not be enough.
Ah, right. For some reason I was thinking that only affected the link
entry, but of course the mode bits are on the linked inode itself. So
that does easily give some protection, though I agree that many programs
are happy to circumvent it for you.
It has been a long time since I've used it, but I think there may be
some prior at in git-annex:
https://git-annex.branchable.com/
IIRC it can work in a "copy" mode where contents are copied into the
working tree. But since the point is to deal with large data sets, it
also has a linking mode (maybe even symlinks?) that point directly from
the working tree into the annex storage. If we are considering a similar
feature, we might be able to learn from their experience.
-Peff
prev parent reply other threads:[~2023-10-04 13:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-27 4:15 [silly] loose, pack, and another thing? Junio C Hamano
2023-09-27 13:46 ` Christian Couder
2023-09-28 21:47 ` Jonathan Tan
2023-09-28 21:40 ` Jonathan Tan
2023-10-03 19:09 ` Jeff King
2023-10-03 21:26 ` Junio C Hamano
2023-10-04 13:11 ` Jeff King [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231004131110.GA607079@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jonathantanmy@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).