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

Re: "git reflog expire --all" very slow

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 31, 2009, 05:57 UTC
Message-ID
<7vmyb26xp4.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<alpine.LFD.2.00.0903302239040.4093@localhost.localdomain>
Linus Torvalds <torvalds@linux-foundation.org> writes:
Show 25 quoted lines
> On Mon, 30 Mar 2009, Junio C Hamano wrote:
>> 
>> I do have a lot of reflog entries kept around, as my main repository has
>> these:
>> 
>>         [gc]
>>                 reflogexpire = '2005-01-01 00:00:00 +0000'
>>                 reflogexpireunreachable = '2005-01-01 00:00:00 +0000'
>
> I think that actually _hides_ the problem. You'll never have anything at 
> all that triggers that
>
> 	if (timestamp < cb->cmd->expire_unreachable) {
>
> because your "expire_unreachable" timestamp is already very old (== small 
> value), so 'timestamp' will _not_ be older (smaller value) than that.
>
> I dunno. As mentioned, I don't really understand why we'd want to save 
> some of those reflog entries at all in the first place, so I'm probably 
> missing something.
>
> If we've asked for reflog entries past a certain age to be expired, why do 
> when then look at the details of those reflog entries and only expire them 
> under certain circumstances? Just expire them, and get rid of the 
> 'unreachable' part.

I know. My test repository does not have them. I only quoted them to tell you that I have a lot of entries to play with.

Previous: Linus TorvaldsNext: Junio C Hamano
Message 6 of 13 in “"git reflog expire --all" very slow”
  1. Linus TorvaldsMar 31, 2009
  2. Junio C HamanoMar 31, 2009
  3. Linus TorvaldsMar 31, 2009
  4. Junio C HamanoMar 31, 2009
  5. Linus TorvaldsMar 31, 2009
  6. Junio C HamanoMar 31, 2009
  7. Junio C HamanoMar 31, 2009
  8. Linus TorvaldsMar 31, 2009
  9. Linus TorvaldsMar 31, 2009
  10. Linus TorvaldsMar 31, 2009
  11. Junio C HamanoApr 2, 2009
  12. Linus TorvaldsApr 2, 2009
  13. Junio C HamanoMar 31, 2009

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.