git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Patrick Steinhardt <ps@pks.im>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 5/7] t1405: remove unneeded cleanup step
Date: Wed, 14 Feb 2024 15:17:32 -0800	[thread overview]
Message-ID: <xmqq4jeatz3n.fsf@gitster.g> (raw)
In-Reply-To: <25cf00c36f715edc6b4e86001a36a093f4c4b2e0.1707463221.git.ps@pks.im> (Patrick Steinhardt's message of "Fri, 9 Feb 2024 08:23:26 +0100")

Patrick Steinhardt <ps@pks.im> writes:

> In 5e00514745 (t1405: explictly delete reflogs for reftable, 2022-01-31)
> we have added a test that explicitly deletes the reflog when not using
> the "files" backend. This was required because back then, the "reftable"
> backend didn't yet delete reflogs when deleting their corresponding
> branches, and thus subsequent tests would fail because some unexpected
> reflogs still exist.
>
> The "reftable" backend was eventually changed though so that it behaves
> the same as the "files" backend and deletes reflogs when deleting refs.
> This was done to make the "reftable" backend behave like the "files"
> backend as closely as possible so that it can act as a drop-in
> replacement.
>
> The cleanup-style test is thus not required anymore. Remove it.
>
> Signed-off-by: Patrick Steinhardt <ps@pks.im>
> ---
>  t/t1405-main-ref-store.sh | 6 ------
>  1 file changed, 6 deletions(-)

Again, makes sense.

This is a tangent, but artificial limitations we imposed on reftable
to be more similar to files backend may be something we would want
to reconsider once reftable hits mainline and people actively start
using it.  Not having to lose the reflog only because you removed a
branch by mistake would be a powerful thing, as it would allow you
to resurrect the branch as well as its log.  Being able to have a
branch 'foo', with work related to 'foo' kept inbranches 'foo/arc1'
'foo/arc2', etc., would be a very nice organizational tool.

But it is a good idea to start limited and later making it looser.
These two limitations are something all users are already familiar
with, so it is not as cripplingly bad as it smells anyway.

Thanks.

>
> diff --git a/t/t1405-main-ref-store.sh b/t/t1405-main-ref-store.sh
> index 976bd71efb..1183232a72 100755
> --- a/t/t1405-main-ref-store.sh
> +++ b/t/t1405-main-ref-store.sh
> @@ -33,12 +33,6 @@ test_expect_success 'delete_refs(FOO, refs/tags/new-tag)' '
>  	test_must_fail git rev-parse refs/tags/new-tag --
>  '
>  
> -# In reftable, we keep the reflogs around for deleted refs.
> -test_expect_success !REFFILES 'delete-reflog(FOO, refs/tags/new-tag)' '
> -	$RUN delete-reflog FOO &&
> -	$RUN delete-reflog refs/tags/new-tag
> -'
> -
>  test_expect_success 'rename_refs(main, new-main)' '
>  	git rev-parse main >expected &&
>  	$RUN rename-ref refs/heads/main refs/heads/new-main &&

  reply	other threads:[~2024-02-14 23:17 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-09  7:23 [PATCH 0/7] t: drop more REFFILES prereqs Patrick Steinhardt
2024-02-09  7:23 ` [PATCH 1/7] t: move tests exercising the "files" backend Patrick Steinhardt
2024-02-14 22:45   ` Junio C Hamano
2024-02-09  7:23 ` [PATCH 2/7] t0410: enable tests with extensions with non-default repo format Patrick Steinhardt
2024-02-14 22:57   ` Junio C Hamano
2024-02-15  7:59     ` Patrick Steinhardt
2024-02-15 17:18       ` Junio C Hamano
2024-02-09  7:23 ` [PATCH 3/7] t1400: exercise reflog with gaps with reftable backend Patrick Steinhardt
2024-02-14 22:59   ` Junio C Hamano
2024-02-09  7:23 ` [PATCH 4/7] t1404: make D/F conflict tests compatible " Patrick Steinhardt
2024-02-14 23:11   ` Junio C Hamano
2024-02-09  7:23 ` [PATCH 5/7] t1405: remove unneeded cleanup step Patrick Steinhardt
2024-02-14 23:17   ` Junio C Hamano [this message]
2024-02-15  7:59     ` Patrick Steinhardt
2024-02-09  7:23 ` [PATCH 6/7] t2011: exercise D/F conflicts with HEAD with the reftable backend Patrick Steinhardt
2024-02-09  7:23 ` [PATCH 7/7] t7003: ensure filter-branch prunes reflogs " Patrick Steinhardt
2024-02-11 14:00 ` [PATCH 0/7] t: drop more REFFILES prereqs Karthik Nayak
2024-02-14 23:20 ` Junio C Hamano
2024-02-15  8:14   ` Patrick Steinhardt
2024-02-15  8:25 ` [PATCH v2 " Patrick Steinhardt
2024-02-15  8:25   ` [PATCH v2 1/7] t: move tests exercising the "files" backend Patrick Steinhardt
2024-02-15  8:25   ` [PATCH v2 2/7] t0410: convert tests to use DEFAULT_REPO_FORMAT prereq Patrick Steinhardt
2024-02-15 18:19     ` Junio C Hamano
2024-02-15  8:25   ` [PATCH v2 3/7] t1400: exercise reflog with gaps with reftable backend Patrick Steinhardt
2024-02-15  8:25   ` [PATCH v2 4/7] t1404: make D/F conflict tests compatible " Patrick Steinhardt
2024-02-15  8:25   ` [PATCH v2 5/7] t1405: remove unneeded cleanup step Patrick Steinhardt
2024-02-15  8:25   ` [PATCH v2 6/7] t2011: exercise D/F conflicts with HEAD with the reftable backend Patrick Steinhardt
2024-02-15  8:25   ` [PATCH v2 7/7] t7003: ensure filter-branch prunes reflogs " Patrick Steinhardt

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

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

  git send-email \
    --in-reply-to=xmqq4jeatz3n.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=ps@pks.im \
    /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.
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 NNTP newsgroup(s).