git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "René Scharfe" <l.s.r@web.de>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	"Derrick Stolee" <stolee@gmail.com>
Cc: Derrick Stolee via GitGitGadget <gitgitgadget@gmail.com>,
	Git List <git@vger.kernel.org>
Subject: Re: p2000 failure due to empty reflog
Date: Sat, 9 Oct 2021 16:39:26 +0200	[thread overview]
Message-ID: <23cfe67d-5a7c-6525-cb50-396cbd1121c6@web.de> (raw)
In-Reply-To: <8735pfjg47.fsf@evledraar.gmail.com>

Am 05.10.21 um 23:38 schrieb Ævar Arnfjörð Bjarmason:
>
> On Mon, Oct 04 2021, Derrick Stolee wrote:
>
>> On 10/2/2021 1:37 PM, René Scharfe wrote:
>>> p2000 fails for me and reports:
>>>
>>>    perf 18 - git checkout -f - (full-v3):
>>>    running:
>>>    			(
>>>    				cd full-v3 &&
>>>    				echo >>f2/f4/a &&
>>>    				git checkout -f -
>>>    			)
>>>
>>>    error: pathspec '-' did not match any file(s) known to git
>>>
>>> checkout fails because the reflog is empty, so the "-" can't be
>>> resolved.  The pathspec error message is confusing, though.
>>>
>>> The patch below adds a reflog entry and allows the script to
>>> succeed.
>>>
>>> Before the "test_perf_on_all git commit -a -m A", there are two
>>> reflog entries in each of the five clones, after it there are
>>> none.  How is that even possible?
>>
>> That is certainly confusing. Is there something about your global
>> (or local to your test repo) GC settings that cause an auto-GC to
>> prune the reflog aggressively?
>
> Perhaps something to do with certain parts of the code doing a
> time(NULL), and other parts faking up times to be 2005-something?
>
> I have some WIP patches that run concurrent "git gc --auto" with a
> detach across the whole test suite, and IIRC I had to search/replace all
> time(NULL) with my own time() that faked up (looks it up) an epoch of
> 1113465166 to avoid this exact issue.
>
> If you try doing that across our tests I think you'll find that the
> @{-1} syntax (reflog-powered) will start failing.
>
> But that's from vague memory, but perhaps it'll point you in the right
> direction...
Yes, that helped.  The reflog entries have fake dates in 2005, and "git
reflog expire --all" called by "git gc --auto" deletes entries older
than 90 days based on the actual current time.

René

      reply	other threads:[~2021-10-09 14:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-02 17:37 p2000 failure due to empty reflog René Scharfe
2021-10-04 19:55 ` Derrick Stolee
2021-10-05 20:28   ` René Scharfe
2021-10-06 16:59     ` Junio C Hamano
2021-10-09 14:39       ` [PATCH] perf: disable automatic housekeeping René Scharfe
2021-10-09 14:57         ` "git reflog expire" blindly trusting timestamps in reflogs Ævar Arnfjörð Bjarmason
2021-10-09 17:50           ` Junio C Hamano
2021-10-11 16:32           ` Jeff King
2021-10-05 21:38   ` p2000 failure due to empty reflog Ævar Arnfjörð Bjarmason
2021-10-09 14:39     ` René Scharfe [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=23cfe67d-5a7c-6525-cb50-396cbd1121c6@web.de \
    --to=l.s.r@web.de \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=stolee@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).