git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Han-Wen Nienhuys via GitGitGadget <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, Han-Wen Nienhuys <hanwenn@gmail.com>,
	Han-Wen Nienhuys <hanwen@google.com>
Subject: Re: [PATCH 13/18] t2017: mark --orphan/logAllRefUpdates=false test as REFFILES
Date: Wed, 21 Apr 2021 08:39:15 +0200	[thread overview]
Message-ID: <87pmyo3zvw.fsf@evledraar.gmail.com> (raw)
In-Reply-To: <1ce545043846ee06070d1a4bc05fcd5221847eab.1618829583.git.gitgitgadget@gmail.com>


On Mon, Apr 19 2021, Han-Wen Nienhuys via GitGitGadget wrote:

> From: Han-Wen Nienhuys <hanwen@google.com>
>
> In reftable, there is no notion of a per-ref 'existence' of a reflog. Each
> reflog entry has its own key, so it is not possible to distinguish between
> {reflog doesn't exist,reflog exists but is empty}. This makes the logic
> in log_ref_setup() (file refs/files-backend.c), which depends on the existence
> of the reflog file infeasible.

Okey, so I'd follow this if the test was doing something like "test -e
.git/logs" to test whether we didn't have reflogs for a specific branch
or something....

> Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
> ---
>  t/t2017-checkout-orphan.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/t/t2017-checkout-orphan.sh b/t/t2017-checkout-orphan.sh
> index c7adbdd39ab9..88d6992a5e1f 100755
> --- a/t/t2017-checkout-orphan.sh
> +++ b/t/t2017-checkout-orphan.sh
> @@ -76,7 +76,7 @@ test_expect_success '--orphan makes reflog by default' '
>  	git rev-parse --verify delta@{0}
>  '
>  
> -test_expect_success '--orphan does not make reflog when core.logAllRefUpdates = false' '
> +test_expect_success REFFILES '--orphan does not make reflog when core.logAllRefUpdates = false' '
>  	git checkout main &&
>  	git config core.logAllRefUpdates false &&
>  	git checkout --orphan epsilon &&

... but in this test we don't end up doing anything that obviously
depends on ref files, right after this context we do (and this is the
entire test):

    test_must_fail git rev-parse --verify epsilon@{0} &&
    git commit -m Epsilon &&
    test_must_fail git rev-parse --verify epsilon@{0}

So either this is over-skipping of a test, or a summary like this would
be more inaccurate (I'm not suggesting to include it, just writing it
out to state/check my assumptions):

    [...]the reflog implementation leaks the implementation detail that
    it has no per-ref instance of the reflog all the way up to syntax
    like "rev-parse --verify branch@{0}", which is just asking for the
    Nth reflog entry for a branch[...]

But maybe I'm wrong about that, "man git-rev-parse" says, "This" is
reference to the @{<n>} syntax:

    [...]This suffix may only be used immediately following a ref name
    and the ref must have an existing log ($GIT_DIR/logs/<refname>).

In your v7[1] of the reftable series there's no patch to
Documentation/revisions.txt altering that blurb.

So it seems to me that between this & that series there's some closing
of the gap needed with how this "must have an existing log" even works
under reftable.

Per [2] I had assumed that this worked under reftable by abstracting
away the syntax to some query for the ref name, and faking up "file does
not exist" as "there were no records" to anything like rev-parse, but it
doesn't work like that?

1. https://lore.kernel.org/git/pull.847.v7.git.git.1618832276.gitgitgadget@gmail.com/
2. https://eclipse.googlesource.com/jgit/jgit/+/master/Documentation/technical/reftable.md#log-record
3. https://lore.kernel.org/git/87sg3k40mc.fsf@evledraar.gmail.com/

  reply	other threads:[~2021-04-21  6:39 UTC|newest]

Thread overview: 138+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-19 10:52 [PATCH 00/18] Prepare tests for reftable backend Han-Wen Nienhuys via GitGitGadget
2021-04-19 10:52 ` [PATCH 01/18] t4202: split testcase for invalid HEAD symref and HEAD hash Han-Wen Nienhuys via GitGitGadget
2021-04-19 21:11   ` SZEDER Gábor
2021-04-27  9:14     ` Han-Wen Nienhuys
2021-04-19 10:52 ` [PATCH 02/18] t9300: check ref existence using git-rev-parse rather than FS check Han-Wen Nienhuys via GitGitGadget
2021-04-21  6:01   ` Ævar Arnfjörð Bjarmason
2021-04-27  9:20     ` Han-Wen Nienhuys
2021-04-19 10:52 ` [PATCH 03/18] t5601: read HEAD using rev-parse Han-Wen Nienhuys via GitGitGadget
2021-04-19 10:52 ` [PATCH 04/18] t1401-symbolic-ref: avoid direct filesystem access Han-Wen Nienhuys via GitGitGadget
2021-04-19 20:38   ` SZEDER Gábor
2021-04-27  9:13     ` Han-Wen Nienhuys
2021-04-21  6:09   ` Ævar Arnfjörð Bjarmason
2021-04-21  9:09     ` Han-Wen Nienhuys
2021-04-22  4:59       ` SZEDER Gábor
2021-04-22 13:01         ` Han-Wen Nienhuys
2021-04-23  5:12           ` SZEDER Gábor
2021-04-23  7:47             ` Han-Wen Nienhuys
2021-04-23  7:53               ` Han-Wen Nienhuys
2021-04-23  9:16                 ` Ævar Arnfjörð Bjarmason
2021-04-26 18:01                   ` Han-Wen Nienhuys
2021-04-19 10:52 ` [PATCH 05/18] t1413: use tar to save and restore entire .git directory Han-Wen Nienhuys via GitGitGadget
2021-04-20 22:51   ` Junio C Hamano
2021-04-27  9:15     ` Han-Wen Nienhuys
2021-04-19 10:52 ` [PATCH 06/18] t1301: fix typo in error message Han-Wen Nienhuys via GitGitGadget
2021-04-19 10:52 ` [PATCH 07/18] t5000: inspect HEAD using git-rev-parse Han-Wen Nienhuys via GitGitGadget
2021-04-21  6:11   ` Ævar Arnfjörð Bjarmason
2021-04-27  9:22     ` Han-Wen Nienhuys
2021-04-19 10:52 ` [PATCH 08/18] t7003: use rev-parse rather than FS inspection Han-Wen Nienhuys via GitGitGadget
2021-04-19 10:52 ` [PATCH 09/18] t5304: use "reflog expire --all" to clear the reflog Han-Wen Nienhuys via GitGitGadget
2021-04-21  6:13   ` Ævar Arnfjörð Bjarmason
2021-04-27  9:23     ` Han-Wen Nienhuys
2021-04-19 10:52 ` [PATCH 10/18] test-lib: provide test prereq REFFILES Han-Wen Nienhuys via GitGitGadget
2021-04-20 22:57   ` Junio C Hamano
2021-04-20 23:37     ` Junio C Hamano
2021-04-26 11:09       ` Han-Wen Nienhuys
2021-04-27  9:16     ` Han-Wen Nienhuys
2021-04-19 10:52 ` [PATCH 11/18] t1407: require REFFILES for for_each_reflog test Han-Wen Nienhuys via GitGitGadget
2021-04-21  6:23   ` Ævar Arnfjörð Bjarmason
2021-04-27  9:27     ` Han-Wen Nienhuys
2021-04-19 10:52 ` [PATCH 12/18] t1414: mark corruption test with REFFILES Han-Wen Nienhuys via GitGitGadget
2021-04-19 10:52 ` [PATCH 13/18] t2017: mark --orphan/logAllRefUpdates=false test as REFFILES Han-Wen Nienhuys via GitGitGadget
2021-04-21  6:39   ` Ævar Arnfjörð Bjarmason [this message]
2021-04-29 18:14     ` Han-Wen Nienhuys
2021-04-19 10:52 ` [PATCH 14/18] t1404: mark tests that muck with .git directly " Han-Wen Nienhuys via GitGitGadget
2021-04-21  6:57   ` Ævar Arnfjörð Bjarmason
2021-04-26 18:36     ` Han-Wen Nienhuys
2021-04-19 10:53 ` [PATCH 15/18] t7900: mark pack-refs tests " Han-Wen Nienhuys via GitGitGadget
2021-04-21  7:00   ` Ævar Arnfjörð Bjarmason
2021-04-27  9:41     ` Han-Wen Nienhuys
2021-04-19 10:53 ` [PATCH 16/18] t7003: check reflog existence only for REFFILES Han-Wen Nienhuys via GitGitGadget
2021-04-20 22:59   ` Junio C Hamano
2021-04-26 17:42     ` Han-Wen Nienhuys
2021-04-27  9:17     ` Han-Wen Nienhuys
2021-04-21  7:02   ` Ævar Arnfjörð Bjarmason
2021-04-19 10:53 ` [PATCH 17/18] t4202: mark bogus head hash test with REFFILES Han-Wen Nienhuys via GitGitGadget
2021-04-21  7:08   ` Ævar Arnfjörð Bjarmason
2021-04-26 18:02     ` Han-Wen Nienhuys
2021-04-19 10:53 ` [PATCH 18/18] t1415: set REFFILES for test specific to storage format Han-Wen Nienhuys via GitGitGadget
2021-04-21  7:15   ` Ævar Arnfjörð Bjarmason
2021-04-26 17:41     ` Han-Wen Nienhuys
2021-04-27 10:38 ` [PATCH v2 00/21] Prepare tests for reftable backend Han-Wen Nienhuys via GitGitGadget
2021-04-27 10:38   ` [PATCH v2 01/21] t4202: split testcase for invalid HEAD symref and HEAD hash Han-Wen Nienhuys via GitGitGadget
2021-05-20 15:03     ` Ævar Arnfjörð Bjarmason
2021-05-31 13:54       ` Han-Wen Nienhuys
2021-04-27 10:38   ` [PATCH v2 02/21] t/helper/ref-store: initialize oid in resolve-ref Han-Wen Nienhuys via GitGitGadget
2021-05-20 15:06     ` Ævar Arnfjörð Bjarmason
2021-05-31 14:48       ` Han-Wen Nienhuys
2021-04-27 10:38   ` [PATCH v2 03/21] t9300: check ref existence using test-helper rather than a file system check Han-Wen Nienhuys via GitGitGadget
2021-05-20 15:11     ` Ævar Arnfjörð Bjarmason
2021-04-27 10:38   ` [PATCH v2 04/21] t5601: read HEAD using rev-parse Han-Wen Nienhuys via GitGitGadget
2021-04-27 10:38   ` [PATCH v2 05/21] t1401-symbolic-ref: avoid direct filesystem access Han-Wen Nienhuys via GitGitGadget
2021-05-20 15:20     ` Ævar Arnfjörð Bjarmason
2021-05-31 13:40       ` Han-Wen Nienhuys
2021-04-27 10:38   ` [PATCH v2 06/21] t1413: use tar to save and restore entire .git directory Han-Wen Nienhuys via GitGitGadget
2021-05-20 15:22     ` Ævar Arnfjörð Bjarmason
2021-05-31 15:16       ` Han-Wen Nienhuys
2021-04-27 10:38   ` [PATCH v2 07/21] t1301: fix typo in error message Han-Wen Nienhuys via GitGitGadget
2021-04-27 10:38   ` [PATCH v2 08/21] t5000: reformat indentation to the latest fashion Han-Wen Nienhuys via GitGitGadget
2021-05-20 15:24     ` Ævar Arnfjörð Bjarmason
2021-05-31 13:56       ` Han-Wen Nienhuys
2021-04-27 10:38   ` [PATCH v2 09/21] t5000: inspect HEAD using git-rev-parse Han-Wen Nienhuys via GitGitGadget
2021-04-27 10:38   ` [PATCH v2 10/21] t7003: use rev-parse rather than FS inspection Han-Wen Nienhuys via GitGitGadget
2021-04-27 10:38   ` [PATCH v2 11/21] t5304: restyle: trim empty lines, drop ':' before > Han-Wen Nienhuys via GitGitGadget
2021-04-27 10:38   ` [PATCH v2 12/21] t5304: use "reflog expire --all" to clear the reflog Han-Wen Nienhuys via GitGitGadget
2021-05-20 15:27     ` Ævar Arnfjörð Bjarmason
2021-05-31 14:04       ` Han-Wen Nienhuys
2021-04-27 10:38   ` [PATCH v2 13/21] test-lib: provide test prereq REFFILES Han-Wen Nienhuys via GitGitGadget
2021-04-27 10:38   ` [PATCH v2 14/21] t1407: require REFFILES for for_each_reflog test Han-Wen Nienhuys via GitGitGadget
2021-04-27 10:38   ` [PATCH v2 15/21] t1414: mark corruption test with REFFILES Han-Wen Nienhuys via GitGitGadget
2021-05-20 15:31     ` Ævar Arnfjörð Bjarmason
2021-04-27 10:38   ` [PATCH v2 16/21] t2017: mark --orphan/logAllRefUpdates=false test as REFFILES Han-Wen Nienhuys via GitGitGadget
2021-05-20 15:38     ` Ævar Arnfjörð Bjarmason
2021-04-27 10:38   ` [PATCH v2 17/21] t1404: mark tests that muck with .git directly " Han-Wen Nienhuys via GitGitGadget
2021-04-27 10:38   ` [PATCH v2 18/21] t7900: mark pack-refs tests " Han-Wen Nienhuys via GitGitGadget
2021-05-20 15:40     ` Ævar Arnfjörð Bjarmason
2021-05-31 14:08       ` Han-Wen Nienhuys
2021-04-27 10:38   ` [PATCH v2 19/21] t7003: check reflog existence only for REFFILES Han-Wen Nienhuys via GitGitGadget
2021-05-20 15:41     ` Ævar Arnfjörð Bjarmason
2021-05-31 14:27       ` Han-Wen Nienhuys
2021-04-27 10:38   ` [PATCH v2 20/21] t4202: mark bogus head hash test with REFFILES Han-Wen Nienhuys via GitGitGadget
2021-05-20 15:43     ` Ævar Arnfjörð Bjarmason
2021-05-31 14:21       ` Han-Wen Nienhuys
2021-04-27 10:38   ` [PATCH v2 21/21] t1415: set REFFILES for test specific to storage format Han-Wen Nienhuys via GitGitGadget
2021-05-20 15:50     ` Ævar Arnfjörð Bjarmason
2021-05-31 14:16       ` Han-Wen Nienhuys
2021-05-31 23:36         ` Ævar Arnfjörð Bjarmason
2021-05-20 16:28   ` [PATCH v2 00/21] Prepare tests for reftable backend Ævar Arnfjörð Bjarmason
2021-05-26  9:23     ` Han-Wen Nienhuys
2021-05-26  9:52       ` Ævar Arnfjörð Bjarmason
2021-05-31 14:37         ` Han-Wen Nienhuys
2021-05-31 16:56   ` [PATCH v3 00/22] " Han-Wen Nienhuys via GitGitGadget
2021-05-31 16:56     ` [PATCH v3 01/22] t4202: split testcase for invalid HEAD symref and HEAD hash Han-Wen Nienhuys via GitGitGadget
2021-05-31 16:56     ` [PATCH v3 02/22] t/helper/ref-store: initialize oid in resolve-ref Han-Wen Nienhuys via GitGitGadget
2021-05-31 16:56     ` [PATCH v3 03/22] t9300: check ref existence using test-helper rather than a file system check Han-Wen Nienhuys via GitGitGadget
2021-05-31 16:56     ` [PATCH v3 04/22] t5601: read HEAD using rev-parse Han-Wen Nienhuys via GitGitGadget
2021-05-31 16:56     ` [PATCH v3 05/22] t1401: use tar to snapshot and restore repo state Han-Wen Nienhuys via GitGitGadget
2021-05-31 16:56     ` [PATCH v3 06/22] t1401-symbolic-ref: avoid direct filesystem access Han-Wen Nienhuys via GitGitGadget
2021-05-31 16:56     ` [PATCH v3 07/22] t1413: use tar to save and restore entire .git directory Han-Wen Nienhuys via GitGitGadget
2021-06-01  4:55       ` Bagas Sanjaya
2021-06-01  9:23         ` Han-Wen Nienhuys
2021-06-01 20:44           ` Junio C Hamano
2021-06-02  7:49             ` Han-Wen Nienhuys
2021-05-31 16:56     ` [PATCH v3 08/22] t1301: fix typo in error message Han-Wen Nienhuys via GitGitGadget
2021-05-31 16:56     ` [PATCH v3 09/22] t5000: reformat indentation to the latest fashion Han-Wen Nienhuys via GitGitGadget
2021-05-31 16:56     ` [PATCH v3 10/22] t5000: inspect HEAD using git-rev-parse Han-Wen Nienhuys via GitGitGadget
2021-05-31 16:56     ` [PATCH v3 11/22] t7003: use rev-parse rather than FS inspection Han-Wen Nienhuys via GitGitGadget
2021-05-31 16:56     ` [PATCH v3 12/22] t5304: restyle: trim empty lines, drop ':' before > Han-Wen Nienhuys via GitGitGadget
2021-05-31 16:56     ` [PATCH v3 13/22] t5304: use "reflog expire --all" to clear the reflog Han-Wen Nienhuys via GitGitGadget
2021-05-31 16:56     ` [PATCH v3 14/22] test-lib: provide test prereq REFFILES Han-Wen Nienhuys via GitGitGadget
2021-05-31 16:56     ` [PATCH v3 15/22] t1407: require REFFILES for for_each_reflog test Han-Wen Nienhuys via GitGitGadget
2021-05-31 16:56     ` [PATCH v3 16/22] t1414: mark corruption test with REFFILES Han-Wen Nienhuys via GitGitGadget
2021-05-31 16:56     ` [PATCH v3 17/22] t2017: mark --orphan/logAllRefUpdates=false test as REFFILES Han-Wen Nienhuys via GitGitGadget
2021-05-31 16:56     ` [PATCH v3 18/22] t1404: mark tests that muck with .git directly " Han-Wen Nienhuys via GitGitGadget
2021-05-31 16:56     ` [PATCH v3 19/22] t7900: stop checking for loose refs Han-Wen Nienhuys via GitGitGadget
2021-05-31 16:56     ` [PATCH v3 20/22] t7003: check reflog existence only for REFFILES Han-Wen Nienhuys via GitGitGadget
2021-05-31 16:56     ` [PATCH v3 21/22] t4202: mark bogus head hash test with REFFILES Han-Wen Nienhuys via GitGitGadget
2021-05-31 16:56     ` [PATCH v3 22/22] t1415: set REFFILES for test specific to storage format Han-Wen Nienhuys via GitGitGadget
2021-05-31 23:57     ` [PATCH v3 00/22] Prepare tests for reftable backend Ævar Arnfjörð Bjarmason

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=87pmyo3zvw.fsf@evledraar.gmail.com \
    --to=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=hanwen@google.com \
    --cc=hanwenn@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).