All of lore.kernel.org
 help / color / mirror / Atom feed
From: "John Cai via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: John Cai <johncai86@gmail.com>, John Cai <johncai86@gmail.com>
Subject: [PATCH 08/12] t1415: move reffiles specific tests to t0600
Date: Wed, 17 Jan 2024 19:52:31 +0000	[thread overview]
Message-ID: <9d10526369525a0ceee2d75742399130ccf885ce.1705521155.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.1647.git.git.1705521155.gitgitgadget@gmail.com>

From: John Cai <johncai86@gmail.com>

Move this test into t0600 with other reffiles specific tests since it
checks for individua loose refs and thus is specific to the reffiles
backend.

Signed-off-by: John Cai <johncai86@gmail.com>
---
 t/t0600-reffiles-backend.sh | 20 ++++++++++++++++++++
 t/t1415-worktree-refs.sh    | 11 -----------
 2 files changed, 20 insertions(+), 11 deletions(-)

diff --git a/t/t0600-reffiles-backend.sh b/t/t0600-reffiles-backend.sh
index 0b28a2cc5ea..8526e5cf987 100755
--- a/t/t0600-reffiles-backend.sh
+++ b/t/t0600-reffiles-backend.sh
@@ -502,4 +502,24 @@ test_expect_success 'empty reflog' '
 	test_must_be_empty err
 '
 
+# The 'packed-refs' file is stored directly in .git/. This means it is global
+# to the repository, and can only contain refs that are shared across all
+# worktrees.
+test_expect_success 'refs/worktree must not be packed' '
+	test_commit initial &&
+	test_commit wt1 &&
+	test_commit wt2 &&
+	git worktree add wt1 wt1 &&
+	git worktree add wt2 wt2 &&
+	git checkout initial &&
+	git update-ref refs/worktree/foo HEAD &&
+	git -C wt1 update-ref refs/worktree/foo HEAD &&
+	git -C wt2 update-ref refs/worktree/foo HEAD &&
+	git pack-refs --all &&
+	test_path_is_missing .git/refs/tags/wt1 &&
+	test_path_is_file .git/refs/worktree/foo &&
+	test_path_is_file .git/worktrees/wt1/refs/worktree/foo &&
+	test_path_is_file .git/worktrees/wt2/refs/worktree/foo
+'
+
 test_done
diff --git a/t/t1415-worktree-refs.sh b/t/t1415-worktree-refs.sh
index 3b531842dd4..eb4eec8becb 100755
--- a/t/t1415-worktree-refs.sh
+++ b/t/t1415-worktree-refs.sh
@@ -17,17 +17,6 @@ test_expect_success 'setup' '
 	git -C wt2 update-ref refs/worktree/foo HEAD
 '
 
-# The 'packed-refs' file is stored directly in .git/. This means it is global
-# to the repository, and can only contain refs that are shared across all
-# worktrees.
-test_expect_success REFFILES 'refs/worktree must not be packed' '
-	git pack-refs --all &&
-	test_path_is_missing .git/refs/tags/wt1 &&
-	test_path_is_file .git/refs/worktree/foo &&
-	test_path_is_file .git/worktrees/wt1/refs/worktree/foo &&
-	test_path_is_file .git/worktrees/wt2/refs/worktree/foo
-'
-
 test_expect_success 'refs/worktree are per-worktree' '
 	test_cmp_rev worktree/foo initial &&
 	( cd wt1 && test_cmp_rev worktree/foo wt1 ) &&
-- 
gitgitgadget


  parent reply	other threads:[~2024-01-17 19:52 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-17 19:52 [PATCH 00/12] Group reffiles tests John Cai via GitGitGadget
2024-01-17 19:52 ` [PATCH 01/12] t3210: move to t0602 John Cai via GitGitGadget
2024-01-18  0:40   ` Junio C Hamano
2024-01-18 11:32     ` Patrick Steinhardt
2024-01-18 16:25       ` John Cai
2024-01-17 19:52 ` [PATCH 02/12] remove REFFILES prerequisite John Cai via GitGitGadget
2024-01-18  0:46   ` Junio C Hamano
2024-01-18 11:21     ` Patrick Steinhardt
2024-01-17 19:52 ` [PATCH 03/12] t1414: convert test to use Git commands instead of writing refs manually John Cai via GitGitGadget
2024-01-18  0:56   ` Junio C Hamano
2024-01-17 19:52 ` [PATCH 04/12] t1404: move reffiles specific tests to t0600 John Cai via GitGitGadget
2024-01-19 13:27   ` Patrick Steinhardt
2024-01-17 19:52 ` [PATCH 05/12] t1405: " John Cai via GitGitGadget
2024-01-17 19:52 ` [PATCH 06/12] t1406: " John Cai via GitGitGadget
2024-01-17 19:52 ` [PATCH 07/12] t1410: " John Cai via GitGitGadget
2024-01-17 19:52 ` John Cai via GitGitGadget [this message]
2024-01-19 13:29   ` [PATCH 08/12] t1415: " Patrick Steinhardt
2024-01-17 19:52 ` [PATCH 09/12] t1503: " John Cai via GitGitGadget
2024-01-17 19:52 ` [PATCH 10/12] t3903: " John Cai via GitGitGadget
2024-01-19 13:39   ` Patrick Steinhardt
2024-01-19 15:47     ` John Cai
2024-01-17 19:52 ` [PATCH 11/12] t4202: " John Cai via GitGitGadget
2024-01-17 19:52 ` [PATCH 12/12] t5312: " John Cai via GitGitGadget
2024-01-19 13:40   ` Patrick Steinhardt
2024-01-18  1:17 ` [PATCH 00/12] Group reffiles tests Junio C Hamano
2024-01-18 11:38   ` Patrick Steinhardt
2024-01-18 20:00     ` Junio C Hamano
2024-01-19 20:18 ` [PATCH v2 " John Cai via GitGitGadget
2024-01-19 20:18   ` [PATCH v2 01/12] t3210: move to t0601 John Cai via GitGitGadget
2024-01-22 11:31     ` Patrick Steinhardt
2024-01-19 20:18   ` [PATCH v2 02/12] remove REFFILES prerequisite for some tests in t1405 and t2017 John Cai via GitGitGadget
2024-01-19 20:18   ` [PATCH v2 03/12] t1414: convert test to use Git commands instead of writing refs manually John Cai via GitGitGadget
2024-01-19 20:18   ` [PATCH v2 04/12] t1404: move reffiles specific tests to t0600 John Cai via GitGitGadget
2024-01-22 11:31     ` Patrick Steinhardt
2024-01-19 20:18   ` [PATCH v2 05/12] t1405: move reffiles specific tests to t0601 John Cai via GitGitGadget
2024-01-19 20:18   ` [PATCH v2 06/12] t1406: move reffiles specific tests to t0600 John Cai via GitGitGadget
2024-01-19 20:18   ` [PATCH v2 07/12] t1410: " John Cai via GitGitGadget
2024-01-22 14:12     ` Karthik Nayak
2024-01-19 20:18   ` [PATCH v2 08/12] t1415: move reffiles specific tests to t0601 John Cai via GitGitGadget
2024-01-22 14:12     ` Karthik Nayak
2024-01-19 20:18   ` [PATCH v2 09/12] t1503: move reffiles specific tests to t0600 John Cai via GitGitGadget
2024-01-19 20:18   ` [PATCH v2 10/12] t3903: make drop stash test ref backend agnostic John Cai via GitGitGadget
2024-01-19 20:18   ` [PATCH v2 11/12] t4202: move reffiles specific tests to t0600 John Cai via GitGitGadget
2024-01-19 20:19   ` [PATCH v2 12/12] t5312: move reffiles specific tests to t0601 John Cai via GitGitGadget
2024-01-22 11:36   ` [PATCH v2 00/12] Group reffiles tests Patrick Steinhardt
2024-01-23  0:01     ` Junio C Hamano
2024-01-24 21:37       ` John Cai

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=9d10526369525a0ceee2d75742399130ccf885ce.1705521155.git.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=johncai86@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.