public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Patrick Steinhardt <ps@pks.im>
Cc: "Paulo Casaretto via GitGitGadget" <gitgitgadget@gmail.com>,
	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>,
	"Eric Sunshine" <sunshine@sunshineco.com>,
	"Johannes Sixt" <j6t@kdbg.org>,
	"Paulo Casaretto" <pcasaretto@gmail.com>
Subject: Re: [PATCH v6] lockfile: add PID file for debugging stale locks
Date: Fri, 06 Feb 2026 11:31:18 -0800	[thread overview]
Message-ID: <xmqqecmxekjd.fsf@gitster.g> (raw)
In-Reply-To: <aYYWfb1E6EHxEyQQ@pks.im> (Patrick Steinhardt's message of "Fri, 6 Feb 2026 17:27:41 +0100")

Patrick Steinhardt <ps@pks.im> writes:

> On Thu, Jan 22, 2026 at 07:23:35PM +0000, Paulo Casaretto via GitGitGadget wrote:
>> diff --git a/t/t0031-lockfile-pid.sh b/t/t0031-lockfile-pid.sh
>> new file mode 100755
>> index 0000000000..8ef87addf5
>> --- /dev/null
>> +++ b/t/t0031-lockfile-pid.sh
>> @@ -0,0 +1,105 @@
>> +#!/bin/sh
>> +
>> +test_description='lock file PID info tests
>> +
>> +Tests for PID info file alongside lock files.
>> +The feature is opt-in via core.lockfilePid config setting (boolean).
>> +'
>> +
>> +. ./test-lib.sh
>> +
>> +test_expect_success 'stale lock detected when PID is not running' '
>> +	git init repo &&
>> +	(
>> +		cd repo &&
>> +		touch .git/index.lock &&
>> +		printf "pid 99999" >.git/index~pid.lock &&
>> +		test_must_fail git -c core.lockfilePid=true add . 2>err &&
>> +		test_grep "process 99999, which is no longer running" err &&
>> +		test_grep "appears to be stale" err
>> +	)
>> +'
>> +
>> +test_expect_success 'PID info not shown by default' '
>> +	git init repo2 &&
>
> Nit, not really worth addressing on its own: you could avoid the
> numbering if you used `test_when_finished rm -rf repo`.
>
> Other than that I don't have any complaints from the ref side anymore,
> and the code seems sensible to me. Thanks!

Thanks, both.

      reply	other threads:[~2026-02-06 19:31 UTC|newest]

Thread overview: 36+ 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
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
2026-01-05 12:23       ` Patrick Steinhardt
2026-01-07 16:45     ` [PATCH v4] " Paulo Casaretto via GitGitGadget
2026-01-08  1:59       ` Junio C Hamano
2026-01-08 14:19         ` D. Ben Knoble
2026-01-20 18:32       ` [PATCH v5] " Paulo Casaretto via GitGitGadget
2026-01-20 20:02         ` Junio C Hamano
2026-01-21  7:13         ` Jeff King
2026-01-21  8:13           ` Eric Sunshine
2026-01-21 10:14             ` Johannes Sixt
2026-01-21 16:39             ` Jeff King
2026-01-21 18:55               ` Junio C Hamano
2026-01-21 19:53                 ` Jeff King
2026-01-21 16:23           ` Junio C Hamano
2026-01-22 19:23         ` [PATCH v6] " Paulo Casaretto via GitGitGadget
2026-01-22 20:17           ` Junio C Hamano
2026-02-06 16:27           ` Patrick Steinhardt
2026-02-06 19:31             ` Junio C Hamano [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=xmqqecmxekjd.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=ben.knoble@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=j6t@kdbg.org \
    --cc=me@ttaylorr.com \
    --cc=paulo.casaretto@shopify.com \
    --cc=pcasaretto@gmail.com \
    --cc=peff@peff.net \
    --cc=ps@pks.im \
    --cc=sunshine@sunshineco.com \
    --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