git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Shubham Kanodia <shubham.kanodia10@gmail.com>
Date
Oct 14, 2024, 04:44 UTC
Message-ID
<CAG=Um+3=SQ7bZYvr4BNxWgMBNreQHgfs-0VQwkzBq=HW8Zxf=Q@mail.gmail.com>
In-Reply-To
<xmqqcyk7lwa4.fsf@gitster.g>
On Thu, Oct 10, 2024 at 10:39 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 22 quoted lines
>
> Patrick Steinhardt <ps@pks.im> writes:
>
> > +     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.
>
> > +     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).

Previous: Junio C HamanoNext: Patrick Steinhardt
Message 17 of 19 in “Bug: `git maintenance start` is likely broken in 2.47”
  1. Shubham KanodiaOct 8, 2024
  2. Patrick SteinhardtOct 8, 2024
  3. builtin/gc: fix crash when running `git maintenance start`Patrick Steinhardt, Oct 8, 2024
  4. Derrick StoleeOct 8, 2024
  5. Derrick StoleeOct 9, 2024
  6. Patrick SteinhardtOct 9, 2024
  7. Junio C HamanoOct 8, 2024
  8. Junio C HamanoOct 9, 2024
  9. Patrick SteinhardtOct 10, 2024
  10. Patrick SteinhardtOct 10, 2024
  11. builtin/gc: fix crash when running `git maintenance start`Patrick Steinhardt, Oct 9, 2024
  12. Derrick StoleeOct 9, 2024
  13. Junio C HamanoOct 9, 2024
  14. Junio C HamanoOct 9, 2024
  15. builtin/gc: fix crash when running `git maintenance start`Patrick Steinhardt, Oct 10, 2024
  16. Junio C HamanoOct 10, 2024
  17. Shubham KanodiaOct 14, 2024
  18. Patrick SteinhardtOct 14, 2024
  19. Taylor BlauOct 15, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.