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

Re: [PATCH] reflog expire --stale-fix: be generous about missing objects

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 12, 2021, 19:35 UTC
Message-ID
<xmqqy2ftuli9.fsf@gitster.c.googlers.com>
In-Reply-To
<nycvar.QRO.7.76.6.2102121702120.29765@tvgsbejvaqbjf.bet>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 15 quoted lines
>> Possibly the correct answer here is "turn off reflogs in new.git", but
>> they are sometimes useful, and things _mostly_ work (for history that
>> doesn't rewind, or where the rewound bits are specific to new.git). So
>> it's useful to be able to run something like "reflog expire --stale-fix"
>> to clear out the occasional problem.
>>
>> (A careful reader will note that objects mentioned only in the index
>> have a similar problem; but again, those tend to be local to new.git,
>> and don't exist at all in a server context).
>
> I want to add the experience with that half year during which `git gc`
> with worktrees was broken, as it would happily ignore the reflogs of the
> worktree-specific `HEAD`s, all except the one from the worktree from which
> `git gc` was run. That was some fun time, and `--stale-fix` was a life
> saver.

The option was invented for a specific case, but if its "fix" applies for breakages caused by more recent bugs and user induced actions, I would agree that that it gives us a good reason to keep it around.

I have to wonder if the explanation in the documentation for the option needs to be made less specific to the originally motivating case, though.

Thanks.
Previous: Johannes Schindelin
Message 5 of 5 in “reflog expire --stale-fix: be generous about missing objects”
  1. reflog expire --stale-fix: be generous about missing objectsJohannes Schindelin via GitGitGadget, Feb 10, 2021
  2. Junio C HamanoFeb 10, 2021
  3. Jeff KingFeb 11, 2021
  4. Johannes SchindelinFeb 12, 2021
  5. Junio C HamanoFeb 12, 2021

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.