All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Han-Wen Nienhuys via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Han-Wen Nienhuys <hanwenn@gmail.com>,
	Han-Wen Nienhuys <hanwen@google.com>
Subject: [PATCH 1/3] t1405: explictly delete reflogs for reftable
Date: Mon, 31 Jan 2022 17:50:18 +0000	[thread overview]
Message-ID: <299451d317f83b908ee4ba750405302238209103.1643651420.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.1209.git.git.1643651420.gitgitgadget@gmail.com>

From: Han-Wen Nienhuys <hanwen@google.com>

Deleting a ref in reftable just records a (ObjectID => ZeroID)
transaction in the reflog. To ensure 'for_each_reflog()' test below
works, explictly delete reflogs for deleted refs.

Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
---
 t/t1405-main-ref-store.sh | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/t/t1405-main-ref-store.sh b/t/t1405-main-ref-store.sh
index 1a3ee8845d6..62e5e9d1b0a 100755
--- a/t/t1405-main-ref-store.sh
+++ b/t/t1405-main-ref-store.sh
@@ -40,6 +40,12 @@ 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 &&
-- 
gitgitgadget


  reply	other threads:[~2022-01-31 17:50 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-31 17:50 [PATCH 0/3] reftable related test tweaks Han-Wen Nienhuys via GitGitGadget
2022-01-31 17:50 ` Han-Wen Nienhuys via GitGitGadget [this message]
2022-01-31 17:50 ` [PATCH 2/3] t1405: mark test that checks existence as REFFILES Han-Wen Nienhuys via GitGitGadget
2022-01-31 21:26   ` Taylor Blau
2022-01-31 22:15     ` Junio C Hamano
2022-02-01 20:06       ` Han-Wen Nienhuys
2022-02-01 21:03         ` Junio C Hamano
2022-02-01 21:22           ` Ævar Arnfjörð Bjarmason
2022-02-01 22:11             ` Junio C Hamano
2022-02-03 16:02               ` Han-Wen Nienhuys
2022-02-03 17:39                 ` Ævar Arnfjörð Bjarmason
2022-02-03 18:10                   ` Han-Wen Nienhuys
2022-02-03 23:06                 ` Junio C Hamano
2022-02-07  9:48                   ` Han-Wen Nienhuys
2022-02-07 16:52                     ` Han-Wen Nienhuys
2022-02-07 23:40                       ` Junio C Hamano
2022-02-08 14:58                         ` Han-Wen Nienhuys
2022-01-31 17:50 ` [PATCH 3/3] t5312: prepare for reftable Han-Wen Nienhuys via GitGitGadget
2022-02-01 21:17   ` Ævar Arnfjörð Bjarmason
2022-02-03 14:24     ` Han-Wen Nienhuys
2022-02-03 18:31       ` Junio C Hamano

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=299451d317f83b908ee4ba750405302238209103.1643651420.git.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=git@vger.kernel.org \
    --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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.