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

Re: [PATCH v2] t5520: don't expire reflogs where it matters

From
Thomas Bachem <mail@thomasbachem.com>
Date
Oct 1, 2026, 08:07 UTC
Message-ID
<CAA0xjtrDQTOGO_6x7fSfHEM_2kBkyy78NcVGtTtUrSBhw=CEzg@mail.gmail.com>
In-Reply-To
<8b81c508-ac67-498d-b78f-a4b5dab8c198@gmail.com>
Hi Phillip,
On 30/09/2026 16:49, Phillip Wood wrote:
> This doesn't make sense to me. The tests that use "--autostash" will
> clear any changes from the index and worktree and so will never need to
> stash anything while trying different merge strategies which means those
> tests do not run "git stash apply --index".

You're right. On Monday I wrote that the merges don't come from the autostash tests [1], and in v2 that they do. Neither was exact.

They come from the tests that pull with autostash disabled. test_pull_autostash_fail stages a new file and expects the pull to fail, and eight of its calls merge rather than rebase, with "--no-autostash" or with pull.autostash set to false. The staged file is still there when "git merge" starts, so merge stashes it itself and restores it with "git stash apply --index" when the strategy does not handle the merge. The tests that do autostash never get there, as you say.

I'll say it like this in v3: "The tests that pull with autostash disabled run eight such merges, each with a new file staged."

> The second half of this sentence is true, but I'm not sure it is very
> relevant, all that really matters is that we're triggering "git reflog
> expire" at a different point in the test run which is already explained
> by the first half.
I'll drop it.
> "With both" sounds a bit strange to me. Maybe
>
> This means that unfortunately the reflogs are expired at the end of "git
> pull --rebase" in ...
I'll take that.

Thanks, Thomas

[1] <CAA0xjtpzaWH10pHOQ5j-5Hp1yHEKTDFbsicG6E4w=5nxb_irWw@mail.gmail.com>
Previous: Phillip WoodNext: Thomas Bachem via GitGitGadget
Message 10 of 14 in “t5520: don't expire reflogs where it matters”
  1. t5520: don't expire reflogs where it mattersThomas Bachem via GitGitGadget, Sep 28, 2026
  2. Ben KnobleSep 28, 2026
  3. D. Ben KnobleSep 29, 2026
  4. Junio C HamanoSep 29, 2026
  5. Junio C HamanoSep 29, 2026
  6. D. Ben KnobleSep 29, 2026
  7. Junio C HamanoSep 30, 2026
  8. t5520: don't expire reflogs where it mattersThomas Bachem via GitGitGadget, Sep 29, 2026
  9. Phillip WoodSep 30, 2026
  10. Thomas BachemOct 1, 2026
  11. t5520: don't expire reflogs where it mattersThomas Bachem via GitGitGadget, Oct 1, 2026
  12. Phillip WoodOct 1, 2026
  13. Thomas BachemOct 2, 2026
  14. Junio C HamanoOct 2, 2026

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.