Re: [PATCH v3] builtin/gc: fix crash when running `git maintenance start`

4 messages, 4 authors, 2024-10-15 · open the first message on its own page

Re: [PATCH v3] builtin/gc: fix crash when running `git maintenance start`

From: Junio C Hamano <hidden>
Date: 2024-10-10 17:09:41

Patrick Steinhardt [off-list ref] writes:
quoted hunk
+	write_script script/systemctl <<-\EOF &&
+	echo "$*" >>../systemctl.log
+	EOF
Ah, for the purpose of this test, we _know_ in which directory the
"systemctl" will be spawned, so this is good enough for us, of
course.
quoted hunk
+	git init repo &&
+	(
+		cd repo &&
+		sane_unset GIT_TEST_MAINT_SCHEDULER &&
+		PATH="$PWD/../script:$PATH" git maintenance start --scheduler=systemd
I suspect we can use the same idea and add a relative path in $PATH
for the test, perhaps, even though it is not a good coding
discipline.  If $PWD, instead of $(pwd), works, it is perfectly OK.

Will queue.  Thanks.

Re: [PATCH v3] builtin/gc: fix crash when running `git maintenance start`

From: Shubham Kanodia <hidden>
Date: 2024-10-14 04:45:31

On Thu, Oct 10, 2024 at 10:39 PM Junio C Hamano [off-list ref] wrote:
Patrick Steinhardt [off-list ref] writes:
quoted
+     write_script script/systemctl <<-\EOF &&
+     echo "$*" >>../systemctl.log
+     EOF
Ah, for the purpose of this test, we _know_ in which directory the
"systemctl" will be spawned, so this is good enough for us, of
course.
quoted
+     git init repo &&
+     (
+             cd repo &&
+             sane_unset GIT_TEST_MAINT_SCHEDULER &&
+             PATH="$PWD/../script:$PATH" git maintenance start --scheduler=systemd
I suspect we can use the same idea and add a relative path in $PATH
for the test, perhaps, even though it is not a good coding
discipline.  If $PWD, instead of $(pwd), works, it is perfectly OK.

Will queue.  Thanks.
Appreciate for the quick fix, Patrick.

Homebrew upgraded their formulas to 2.47 rather quickly (the next day
after release) —
https://github.com/Homebrew/homebrew-core/commit/0435f258701abd3acb9e2f4cd758cc13aa93997c

Mac users who do a `brew install git` would now install versions with
a broken maintenance command.
Fortunately, `brew` auto-updates the world every time a user installs
anything so it's likely they get to a 2.47.1 in the future,
but that still might be a while away from when they install the
current latest (2.47.0).

I'm not sure if Git has a hotfix workflow, but it might make sense to
prevent more users from getting onto the buggy version
(especially since repo admins usually set up maintenance in the
background and the error might not be evident to users).

Re: [PATCH v3] builtin/gc: fix crash when running `git maintenance start`

From: Patrick Steinhardt <hidden>
Date: 2024-10-14 08:38:59

On Mon, Oct 14, 2024 at 10:14:53AM +0530, Shubham Kanodia wrote:
On Thu, Oct 10, 2024 at 10:39 PM Junio C Hamano [off-list ref] wrote:
quoted
Patrick Steinhardt [off-list ref] writes:
quoted
+     write_script script/systemctl <<-\EOF &&
+     echo "$*" >>../systemctl.log
+     EOF
Ah, for the purpose of this test, we _know_ in which directory the
"systemctl" will be spawned, so this is good enough for us, of
course.
quoted
+     git init repo &&
+     (
+             cd repo &&
+             sane_unset GIT_TEST_MAINT_SCHEDULER &&
+             PATH="$PWD/../script:$PATH" git maintenance start --scheduler=systemd
I suspect we can use the same idea and add a relative path in $PATH
for the test, perhaps, even though it is not a good coding
discipline.  If $PWD, instead of $(pwd), works, it is perfectly OK.

Will queue.  Thanks.
Appreciate for the quick fix, Patrick.

Homebrew upgraded their formulas to 2.47 rather quickly (the next day
after release) —
https://github.com/Homebrew/homebrew-core/commit/0435f258701abd3acb9e2f4cd758cc13aa93997c

Mac users who do a `brew install git` would now install versions with
a broken maintenance command.
Fortunately, `brew` auto-updates the world every time a user installs
anything so it's likely they get to a 2.47.1 in the future,
but that still might be a while away from when they install the
current latest (2.47.0).

I'm not sure if Git has a hotfix workflow, but it might make sense to
prevent more users from getting onto the buggy version
(especially since repo admins usually set up maintenance in the
background and the error might not be evident to users).
I'm not sure around the timeline for Git v2.47.1, and Junio is going to
be out of office for two weeks, so it may take a while. I'd recommend to
backport the patch for now.

Patrick

Re: [PATCH v3] builtin/gc: fix crash when running `git maintenance start`

From: Taylor Blau <hidden>
Date: 2024-10-15 00:36:18

On Mon, Oct 14, 2024 at 10:38:43AM +0200, Patrick Steinhardt wrote:
I'm not sure around the timeline for Git v2.47.1, and Junio is going to
be out of office for two weeks, so it may take a while. I'd recommend to
backport the patch for now.
I'm not planning on cutting any release while Junio is gone, so I'd
expect that a hypothetical 2.47.1 release wouldn't occur until the
beginning of November at the earliest.

Thanks,
Taylor
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help