git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Paulo Casaretto via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, "Taylor Blau" <me@ttaylorr.com>,
	"D. Ben Knoble" <ben.knoble@gmail.com>,
	"Torsten Bögershausen" <tboegi@web.de>,
	"Jeff King" <peff@peff.net>,
	"Paulo Casaretto (Shopify)" <paulo.casaretto@shopify.com>,
	"Paulo Casaretto" <pcasaretto@gmail.com>
Subject: Re: [PATCH v2] lockfile: add PID file for debugging stale locks
Date: Thu, 18 Dec 2025 09:47:35 +0900	[thread overview]
Message-ID: <xmqqbjjwzkd4.fsf@gitster.g> (raw)
In-Reply-To: <pull.2011.v2.git.1765997966593.gitgitgadget@gmail.com> (Paulo Casaretto via GitGitGadget's message of "Wed, 17 Dec 2025 18:59:26 +0000")

"Paulo Casaretto via GitGitGadget" <gitgitgadget@gmail.com> writes:

> The feature is controlled via core.lockfilePid configuration, which
> accepts per-component values similar to core.fsync:
>
>   - none: Disable for all components (default)
>   - all: Enable for all components
>   - index, config, refs, commit-graph, midx, shallow, gc, other:
>     Enable for specific components

As this is about lockfile, you need to decide what should happen
when an older version of Git, which is unaware of this new world
order where .git/index.pid.lock declares ".git/index is being
updated; you should not touch it!", comes to the repository.  You,
as a user of the updated Git, do want them to stop interferring with
the operation on the repository your new Git is making, and it means
you should have some way to telling them "do not touch---you do not
even understand what is in this repository!".

The established way to do so is with a repository extension.  Having
core.lockfilePid that is a plain vanilla configuration variable
would not affect Git that is not aware of the variable, but unknown
repository extension will cause setup.c::verify_repository_format()
to stop Git from making damage.  Perhaps use extensions.lockfilePID
instead?

By the way, we name multi-word configuration variables in CamelCase,
but PID (not "process identifier") is an already all-caps word, so
core.lockfilePid looks awkward.  Call it core.lockfilePID instead?
Oh, with "core.lockfilePID" -> "extensions.lockfilePID", perhaps.


  parent reply	other threads:[~2025-12-18  0:47 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-02 15:07 [PATCH] lockfile: add PID file for debugging stale locks Paulo Casaretto via GitGitGadget
2025-12-02 22:29 ` D. Ben Knoble
2025-12-03 19:48 ` Torsten Bögershausen
2025-12-03 21:16 ` Jeff King
2025-12-03 22:21   ` Junio C Hamano
2025-12-03 22:32     ` Jeff King
2025-12-03 23:19   ` Taylor Blau
2025-12-05 11:03     ` Patrick Steinhardt
2025-12-05 18:46     ` Jeff King
2025-12-03 23:39 ` Taylor Blau
2025-12-17 18:59 ` [PATCH v2] " Paulo Casaretto via GitGitGadget
2025-12-18  0:32   ` Junio C Hamano
2025-12-18  0:47   ` Junio C Hamano [this message]
2025-12-18  1:33     ` Junio C Hamano
2025-12-18  3:38   ` Ben Knoble
2025-12-18  8:07   ` Patrick Steinhardt
2025-12-24 12:24   ` [PATCH v3] " Paulo Casaretto via GitGitGadget
2025-12-25  0:01     ` Junio C Hamano
2025-12-27  7:50     ` Jeff King

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=xmqqbjjwzkd4.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=ben.knoble@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=me@ttaylorr.com \
    --cc=paulo.casaretto@shopify.com \
    --cc=pcasaretto@gmail.com \
    --cc=peff@peff.net \
    --cc=tboegi@web.de \
    /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).