From patchwork Thu Feb 15 08:25:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13557629 Received: from fhigh8-smtp.messagingengine.com (fhigh8-smtp.messagingengine.com [103.168.172.159]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AA23312B7C for ; Thu, 15 Feb 2024 08:25:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.159 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707985536; cv=none; b=CIDKYkTRBCSKsyqZT6CmWGFd+F7ovh6WanaPvn7176Z8uFDBbhucmpUddpSfPt8ndzdzcNQmP1JP8TDO83h3uF00Q728sYRghHaXc1vNysXFzpzfoy/3sxmnDEPb6bv0NHJlzr/KGRsOsgaOEsDm2XMCwxaRp4lROS72ZrkLG4k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707985536; c=relaxed/simple; bh=YBeb+ElxRWsmbp9ih97Nj9+Lh+v51GbUulk2lljw95Q=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Wdq0BPp72Dn9R6Q1R0VRzTzNSgCKpnkSH1KPThvl2B5nQpfPgc8VpCaghhemMSLp3wq4jhaiKkzSi/tK5P9DqEZ3qNDHsFcJR7QfE/muYcc37UH9Cy+wMG8uYVZ6heIWv3tErr8vW7hyhXl5gT7iBl1sbb3wD/29PHDRONK+HYs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=evOzBpwq; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=H5xPElDe; arc=none smtp.client-ip=103.168.172.159 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="evOzBpwq"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="H5xPElDe" Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfhigh.nyi.internal (Postfix) with ESMTP id A21911140094; Thu, 15 Feb 2024 03:25:33 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Thu, 15 Feb 2024 03:25:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1707985533; x=1708071933; bh=SSX0G63c+r T0SwuTxo+IaQjcbupLo7qcfPwJh6UwOuQ=; b=evOzBpwqRQqO2UGArQ/IkrvSi+ QZY0SraD0MN+2EmNDFaQbe4O4USCvL8uBwcqcCwyAEzhlFdD1jqBppM/TmLBF/Pd qkwvzzYSI31BUI4N605sUvBazGBy6VzpnSBVtUUnwaR5f/20nMZ3ngU2eTVS/PLC 36Zh4XcD23+ad804sM9elDCbBIU5U440Jwk/poUDaGAREXoZOBUwytUmLk0eCFGO jUx8KqcGHBrFPWsqkxOhOHRUYM0iW1QbiUB1CAGx3IOf/upvV9RStoATBCLOF5mh pqtEaWcH3ha0zIzfjJnVc7eKpalgy2F04NF65OJBNNn8mDOf9WMdba0+PCQA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1707985533; x=1708071933; bh=SSX0G63c+rT0SwuTxo+IaQjcbupL o7qcfPwJh6UwOuQ=; b=H5xPElDelBhK+HjWysdJz+MP2ER8eMFCqG+nyyB6TkRE fPxbbj9mVKXlSBPN3/j7389VNedmsd1yadFiY/EK9DRpfTFVK9ZvenzGMCgn52wH xmNPaiQlWfceDuJwkq54xvyMAId1k2ist3InTJXTA8opsFu4GEGjCeFichq3sWI1 WST39gNapdvAglfE9wT87cIUeqDGSzd/Nd7OV5I05a3WJB7K5AI0/6OjoWfVF7cI lTt3Npla6oDMk08E6wHVQJLHrWSCgpDVfFXsHICEAbizhqZKUWtf+e3eCk+xdqoU qqDok1L0Be05bFPLconLk2G2Zy27PNjYF8ouUk2q4Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudelgdeihecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvvefukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefrrghtrhhi tghkucfuthgvihhnhhgrrhguthcuoehpshesphhkshdrihhmqeenucggtffrrghtthgvrh hnpeeukedtvedtffevleejtefgheehieegkeeluddvfeefgeehgfeltddtheejleffteen ucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpshesph hkshdrihhm X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 15 Feb 2024 03:25:32 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id eea0cd96 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 15 Feb 2024 08:21:40 +0000 (UTC) Date: Thu, 15 Feb 2024 09:25:30 +0100 From: Patrick Steinhardt To: git@vger.kernel.org Cc: Karthik Nayak , Junio C Hamano Subject: [PATCH v2 1/7] t: move tests exercising the "files" backend Message-ID: <6891cdfdb3a15ab074226a4adca74148ba152fa6.1707985173.git.ps@pks.im> References: Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: We still have a bunch of tests scattered across our test suites that exercise on-disk files of the "files" backend directly: - t1301 exercises permissions of reflog files when the config "core.sharedRepository" is set. - t1400 exercises whether empty directories in the ref store are handled correctly. - t3200 exercises what happens when there are symlinks in the ref store. - t3400 also exercises what happens when ".git/logs" is a symlink. All of these are inherently low-level tests specific to the "files" backend. Move them into "t0600-reffiles-backend.sh" to reflect this. Signed-off-by: Patrick Steinhardt --- t/t0600-reffiles-backend.sh | 91 +++++++++++++++++++++++++++++++++++++ t/t1301-shared-repo.sh | 16 ------- t/t1400-update-ref.sh | 36 --------------- t/t3200-branch.sh | 29 ------------ t/t3400-rebase.sh | 10 ---- 5 files changed, 91 insertions(+), 91 deletions(-) diff --git a/t/t0600-reffiles-backend.sh b/t/t0600-reffiles-backend.sh index e6a5f1868f..485481d6b4 100755 --- a/t/t0600-reffiles-backend.sh +++ b/t/t0600-reffiles-backend.sh @@ -381,4 +381,95 @@ test_expect_success 'log diagnoses bogus HEAD symref' ' test_grep broken stderr ' +test_expect_success 'empty directory removal' ' + git branch d1/d2/r1 HEAD && + git branch d1/r2 HEAD && + test_path_is_file .git/refs/heads/d1/d2/r1 && + test_path_is_file .git/logs/refs/heads/d1/d2/r1 && + git branch -d d1/d2/r1 && + test_must_fail git show-ref --verify -q refs/heads/d1/d2 && + test_must_fail git show-ref --verify -q logs/refs/heads/d1/d2 && + test_path_is_file .git/refs/heads/d1/r2 && + test_path_is_file .git/logs/refs/heads/d1/r2 +' + +test_expect_success 'symref empty directory removal' ' + git branch e1/e2/r1 HEAD && + git branch e1/r2 HEAD && + git checkout e1/e2/r1 && + test_when_finished "git checkout main" && + test_path_is_file .git/refs/heads/e1/e2/r1 && + test_path_is_file .git/logs/refs/heads/e1/e2/r1 && + git update-ref -d HEAD && + test_must_fail git show-ref --verify -q refs/heads/e1/e2 && + test_must_fail git show-ref --verify -q logs/refs/heads/e1/e2 && + test_path_is_file .git/refs/heads/e1/r2 && + test_path_is_file .git/logs/refs/heads/e1/r2 && + test_path_is_file .git/logs/HEAD +' + +test_expect_success 'directory not created deleting packed ref' ' + git branch d1/d2/r1 HEAD && + git pack-refs --all && + test_path_is_missing .git/refs/heads/d1/d2 && + git update-ref -d refs/heads/d1/d2/r1 && + test_path_is_missing .git/refs/heads/d1/d2 && + test_path_is_missing .git/refs/heads/d1 +' + +test_expect_success SYMLINKS 'git branch -m u v should fail when the reflog for u is a symlink' ' + git branch --create-reflog u && + mv .git/logs/refs/heads/u real-u && + ln -s real-u .git/logs/refs/heads/u && + test_must_fail git branch -m u v +' + +test_expect_success SYMLINKS 'git branch -m with symlinked .git/refs' ' + test_when_finished "rm -rf subdir" && + git init --bare subdir && + + rm -rfv subdir/refs subdir/objects subdir/packed-refs && + ln -s ../.git/refs subdir/refs && + ln -s ../.git/objects subdir/objects && + ln -s ../.git/packed-refs subdir/packed-refs && + + git -C subdir rev-parse --absolute-git-dir >subdir.dir && + git rev-parse --absolute-git-dir >our.dir && + ! test_cmp subdir.dir our.dir && + + git -C subdir log && + git -C subdir branch rename-src && + git rev-parse rename-src >expect && + git -C subdir branch -m rename-src rename-dest && + git rev-parse rename-dest >actual && + test_cmp expect actual && + git branch -D rename-dest +' + +test_expect_success MINGW,SYMLINKS_WINDOWS 'rebase when .git/logs is a symlink' ' + git checkout main && + mv .git/logs actual_logs && + cmd //c "mklink /D .git\logs ..\actual_logs" && + git rebase -f HEAD^ && + test -L .git/logs && + rm .git/logs && + mv actual_logs .git/logs +' + +test_expect_success POSIXPERM 'git reflog expire honors core.sharedRepository' ' + umask 077 && + git config core.sharedRepository group && + git reflog expire --all && + actual="$(ls -l .git/logs/refs/heads/main)" && + case "$actual" in + -rw-rw-*) + : happy + ;; + *) + echo Ooops, .git/logs/refs/heads/main is not 066x [$actual] + false + ;; + esac +' + test_done diff --git a/t/t1301-shared-repo.sh b/t/t1301-shared-repo.sh index 8e2c01e760..b1eb5c01b8 100755 --- a/t/t1301-shared-repo.sh +++ b/t/t1301-shared-repo.sh @@ -137,22 +137,6 @@ test_expect_success POSIXPERM 'info/refs respects umask in unshared repo' ' test_cmp expect actual ' -test_expect_success REFFILES,POSIXPERM 'git reflog expire honors core.sharedRepository' ' - umask 077 && - git config core.sharedRepository group && - git reflog expire --all && - actual="$(ls -l .git/logs/refs/heads/main)" && - case "$actual" in - -rw-rw-*) - : happy - ;; - *) - echo Ooops, .git/logs/refs/heads/main is not 066x [$actual] - false - ;; - esac -' - test_expect_success POSIXPERM 'forced modes' ' test_when_finished "rm -rf new" && mkdir -p templates/hooks && diff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh index 78a09abc35..bf37763bd6 100755 --- a/t/t1400-update-ref.sh +++ b/t/t1400-update-ref.sh @@ -288,33 +288,6 @@ test_expect_success "set $m (logged by touch)" ' test $A = $(git show-ref -s --verify $m) ' -test_expect_success REFFILES 'empty directory removal' ' - git branch d1/d2/r1 HEAD && - git branch d1/r2 HEAD && - test_path_is_file .git/refs/heads/d1/d2/r1 && - test_path_is_file .git/logs/refs/heads/d1/d2/r1 && - git branch -d d1/d2/r1 && - test_must_fail git show-ref --verify -q refs/heads/d1/d2 && - test_must_fail git show-ref --verify -q logs/refs/heads/d1/d2 && - test_path_is_file .git/refs/heads/d1/r2 && - test_path_is_file .git/logs/refs/heads/d1/r2 -' - -test_expect_success REFFILES 'symref empty directory removal' ' - git branch e1/e2/r1 HEAD && - git branch e1/r2 HEAD && - git checkout e1/e2/r1 && - test_when_finished "git checkout main" && - test_path_is_file .git/refs/heads/e1/e2/r1 && - test_path_is_file .git/logs/refs/heads/e1/e2/r1 && - git update-ref -d HEAD && - test_must_fail git show-ref --verify -q refs/heads/e1/e2 && - test_must_fail git show-ref --verify -q logs/refs/heads/e1/e2 && - test_path_is_file .git/refs/heads/e1/r2 && - test_path_is_file .git/logs/refs/heads/e1/r2 && - test_path_is_file .git/logs/HEAD -' - cat >expect < 1117150200 +0000 Initial Creation $A $B $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150260 +0000 Switch @@ -1668,13 +1641,4 @@ test_expect_success PIPE 'transaction flushes status updates' ' test_cmp expected actual ' -test_expect_success REFFILES 'directory not created deleting packed ref' ' - git branch d1/d2/r1 HEAD && - git pack-refs --all && - test_path_is_missing .git/refs/heads/d1/d2 && - git update-ref -d refs/heads/d1/d2/r1 && - test_path_is_missing .git/refs/heads/d1/d2 && - test_path_is_missing .git/refs/heads/d1 -' - test_done diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh index de7d3014e4..e36f4d15f2 100755 --- a/t/t3200-branch.sh +++ b/t/t3200-branch.sh @@ -836,35 +836,6 @@ test_expect_success 'renaming a symref is not allowed' ' test_ref_missing refs/heads/new-topic ' -test_expect_success SYMLINKS,REFFILES 'git branch -m u v should fail when the reflog for u is a symlink' ' - git branch --create-reflog u && - mv .git/logs/refs/heads/u real-u && - ln -s real-u .git/logs/refs/heads/u && - test_must_fail git branch -m u v -' - -test_expect_success SYMLINKS,REFFILES 'git branch -m with symlinked .git/refs' ' - test_when_finished "rm -rf subdir" && - git init --bare subdir && - - rm -rfv subdir/refs subdir/objects subdir/packed-refs && - ln -s ../.git/refs subdir/refs && - ln -s ../.git/objects subdir/objects && - ln -s ../.git/packed-refs subdir/packed-refs && - - git -C subdir rev-parse --absolute-git-dir >subdir.dir && - git rev-parse --absolute-git-dir >our.dir && - ! test_cmp subdir.dir our.dir && - - git -C subdir log && - git -C subdir branch rename-src && - git rev-parse rename-src >expect && - git -C subdir branch -m rename-src rename-dest && - git rev-parse rename-dest >actual && - test_cmp expect actual && - git branch -D rename-dest -' - test_expect_success 'test tracking setup via --track' ' git config remote.local.url . && git config remote.local.fetch refs/heads/*:refs/remotes/local/* && diff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh index 57f1392926..e1c8c5f701 100755 --- a/t/t3400-rebase.sh +++ b/t/t3400-rebase.sh @@ -424,16 +424,6 @@ test_expect_success 'refuse to switch to branch checked out elsewhere' ' test_grep "already used by worktree at" err ' -test_expect_success REFFILES,MINGW,SYMLINKS_WINDOWS 'rebase when .git/logs is a symlink' ' - git checkout main && - mv .git/logs actual_logs && - cmd //c "mklink /D .git\logs ..\actual_logs" && - git rebase -f HEAD^ && - test -L .git/logs && - rm .git/logs && - mv actual_logs .git/logs -' - test_expect_success 'rebase when inside worktree subdirectory' ' git init main-wt && ( From patchwork Thu Feb 15 08:25:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13557630 Received: from fout6-smtp.messagingengine.com (fout6-smtp.messagingengine.com [103.168.172.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C6FB9134CC for ; Thu, 15 Feb 2024 08:25:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.149 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707985540; cv=none; b=NDHkrxbuR0I2sUHVubxQwfqOaVD1m/N2iqbEvaURfHLBB467owS0NdB7I75yOHaRxWRbj20OySOHMvHNDHQ2E5oC/0nlCZ3Ls57R6qo8gCbWk78thM8fWJYF1LdvWdqVKhEkUxc2leBPB2HJ6gH2kN4oMvHUJk+90LDgkmsMlMI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707985540; c=relaxed/simple; bh=1FbRW2BUER9MhVnivjqEi1viFH9E67KE+xkZ1ookr9g=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=QCNlmHe1i1S3iJ3GVz3JUEFKT+MgL3m6BK5yZB1Tranmsq6e3iLS88aMumw/EoOk/m3Icds3ExVALbu5mTd2KFxxMYeglMVKT8cRuELwM9wHrhlJDIMpmEA0LDzGz8wgjQAbePxeLFZjrfr/zQ/k/tDZx37Wsq8TSyy4Dh4Doyo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=bk2Fvtr2; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=N8vQFDY6; arc=none smtp.client-ip=103.168.172.149 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="bk2Fvtr2"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="N8vQFDY6" Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailfout.nyi.internal (Postfix) with ESMTP id A2F8213800E8; Thu, 15 Feb 2024 03:25:37 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Thu, 15 Feb 2024 03:25:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1707985537; x=1708071937; bh=K3wgQYVEqW NliaVt1m44FsXq1WsYguJUG0yTnEEBdIM=; b=bk2Fvtr2gL5wAfh5UL9I1hdehp 62S+9ZpjsmBfJLYoV6/5dhqrEposNbNs6nIr1jXfVsuePZSEUHyFeRDTaIXVDnOm IN/EL5b+RkI/zeuax23nxwk/zWssh8UfvTZKU7Xgt5Bz6nHoSbR4nqRZ72lo7Ju/ web+5z3zbb8jm6AkgCMueTkbS3gZyXncUr+4MRd8EAhLr/gnks+ma2ZXE8wX4r4+ v55bM24n2nTDDk8Uh3tzk5Xy4t4KPWRvO8+2k9deygP34GA5B7JG/QNrYnxURZLW dIjTcMNAc2aNc/zIMDrGpptJUAxl/Ppt3EONxtwtZOwRR+HyNRFzsNBPObgg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1707985537; x=1708071937; bh=K3wgQYVEqWNliaVt1m44FsXq1WsY guJUG0yTnEEBdIM=; b=N8vQFDY64ys7PXsOw/Lr2SGCQ5+EIg6AiOLcyLta+XpN gZXipfwMSUAvE5F/PO1XRAw8R0XKlzof6Xe5KmPdsR/n3GHcffztOwdylzjd9GcP F0pVsbKXGnd64qAP2XKmZlx6pnNbbpoqCutEw1NHHJylpMii9+Gordz06Qg0Wgu3 PXuYdhLzlnn8o1T1oJBqVsIYlf1HaaA6Lmit8l7vspl44nXQgEmMD0e+a9OIhljA vCuMq5A3dvreSjlSoJYZJkm901r4QFtpQfVpfGZnSzYyI0pIxuZRsGRew6YPv/z5 ieCG8oRrsACJATFKoz1PTjtNrx2xaTC+tzDj6F6TDA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudelgdeihecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvvefukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefrrghtrhhi tghkucfuthgvihhnhhgrrhguthcuoehpshesphhkshdrihhmqeenucggtffrrghtthgvrh hnpeeukedtvedtffevleejtefgheehieegkeeluddvfeefgeehgfeltddtheejleffteen ucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpshesph hkshdrihhm X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 15 Feb 2024 03:25:36 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id 3324e75a (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 15 Feb 2024 08:21:44 +0000 (UTC) Date: Thu, 15 Feb 2024 09:25:34 +0100 From: Patrick Steinhardt To: git@vger.kernel.org Cc: Karthik Nayak , Junio C Hamano Subject: [PATCH v2 2/7] t0410: convert tests to use DEFAULT_REPO_FORMAT prereq Message-ID: <2dd87f3126cedd39cb5b113053c90ee35ae0e5ff.1707985173.git.ps@pks.im> References: Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: In t0410 we have two tests which exercise how partial clones behave in the context of a repository with extensions. These tests are marked to require a repository using SHA1 and the "files" backend because we explicitly set the repository format version to 0, and setting up either the "objectFormat" or "refStorage" extensions requires a repository format version of 1. We have recently introduced a new DEFAULT_REPO_FORMAT prerequisite. Despite capturing the intent more directly, it also has the added benefit that it can easily be extended in the future in case we add new repository extensions. Adapt the tests to use it. Signed-off-by: Patrick Steinhardt --- t/t0410-partial-clone.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/t0410-partial-clone.sh b/t/t0410-partial-clone.sh index 6b6424b3df..0f98b21be8 100755 --- a/t/t0410-partial-clone.sh +++ b/t/t0410-partial-clone.sh @@ -49,7 +49,7 @@ test_expect_success 'convert shallow clone to partial clone' ' test_cmp_config -C client 1 core.repositoryformatversion ' -test_expect_success SHA1,REFFILES 'convert to partial clone with noop extension' ' +test_expect_success DEFAULT_REPO_FORMAT 'convert to partial clone with noop extension' ' rm -fr server client && test_create_repo server && test_commit -C server my_commit 1 && @@ -60,7 +60,7 @@ test_expect_success SHA1,REFFILES 'convert to partial clone with noop extension' git -C client fetch --unshallow --filter="blob:none" ' -test_expect_success SHA1,REFFILES 'converting to partial clone fails with unrecognized extension' ' +test_expect_success DEFAULT_REPO_FORMAT 'converting to partial clone fails with unrecognized extension' ' rm -fr server client && test_create_repo server && test_commit -C server my_commit 1 && From patchwork Thu Feb 15 08:25:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13557631 Received: from fhigh8-smtp.messagingengine.com (fhigh8-smtp.messagingengine.com [103.168.172.159]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BE10B13AC8 for ; Thu, 15 Feb 2024 08:25:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.159 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707985544; cv=none; b=ZOj52gw1HJyRYVzyN//cfuekiUKGL2bzvxkEEEsW5f1jSSJQlQBRGRlSZXrAOcK5E9AOdrVDwNNf7iUZzTRxeNNsJG54cDQQKK5cb/yMi2C52bkro2rmguPaO+dDZXNXJMI98mxRqSV3SmmA4ZIs8Zsxl32q/fdBjMbmq+fYu4s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707985544; c=relaxed/simple; bh=FRCSHu3KDkFIJArb1qreYFGt5wPC900nWAPrFJl68CY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=DfDagDdp105NwUAhuLo3iZSiPHT3wns2NsVy51dNcsYITTJGaqIKC1/4YVo8usFiSs15MlhfyhIkWD87q/OBedU9k88v0cFw+/efMbvujSv4nddMyD/eEJPGVucA2yG1kF+Ja2IA9LBy9qPA3q9FHpT4+XLR4g1ou+dh35swrEw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=mB0B5IQL; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=LH0zILAE; arc=none smtp.client-ip=103.168.172.159 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="mB0B5IQL"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="LH0zILAE" Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailfhigh.nyi.internal (Postfix) with ESMTP id A28861140094; Thu, 15 Feb 2024 03:25:41 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Thu, 15 Feb 2024 03:25:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1707985541; x=1708071941; bh=EkczgDjwNy xr4LM68CkLzkYZcAPhZe26gz2ynNXzfdo=; b=mB0B5IQLI7hbKNHEFWfFB+/Yhk gSXEvyhEFZrf0sFDBv/cdexkfojO6G7feoNIVvBgtOi9QVc1h9M3Uytnz204W0my gbxYxNp0zVnd4jpcNa6EqfZUyjWtNDgu7fsc+2EQP5avJSZtJpKSNxAFNw2OXmA2 cZzlh+s7Qq2rl9+zxieuejTH4OzjyA1Q+yQjckYEubkZnZWWWmm83+E6/4MlZGpg GNBgIhvIb9lRisVOAVz0cKj90VpF1jmMUkWGihoec7CHA9O2xtQ9gpFO9/5d2fnp RX1bBHUNZxaNymxy/llXqdK+R85Dz63NSI+0m+GwWwBYteV6eb3oXYDHD6kA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1707985541; x=1708071941; bh=EkczgDjwNyxr4LM68CkLzkYZcAPh Ze26gz2ynNXzfdo=; b=LH0zILAEZfoKn9D7Wfax9NGUs0vGS2w0G8b3HFTnB1q7 fr0kDzGR5W1RSXO1K3EIKvLi8VKQgws7zA/w/zLh27Pv6rX3tCn1j+hg1wyavBuf d3w7sCWNFqJD0ZJHG3VHTxhT5ZFG1rezcrL021hXztMjI3sWaPjaHQgFHFFtuJui OOMf/7QMfqUMbV/7Xdp5XOZQw35+QhutPlSPoW+iTOaI06RTo0g8XCDsEEj73kl5 2G1tM0Swgs1QbCzX7nJt2X1F0fqeKTG8S26i2Ro3UsU8RyEt4QB/1OZmye09Xld3 oEhO8uSqdaAvKAxR8pMlcHi6WlzCRtqNyKC1Zbhj+Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudelgdeihecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvvefukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefrrghtrhhi tghkucfuthgvihhnhhgrrhguthcuoehpshesphhkshdrihhmqeenucggtffrrghtthgvrh hnpeeukedtvedtffevleejtefgheehieegkeeluddvfeefgeehgfeltddtheejleffteen ucevlhhushhtvghrufhiiigvpedunecurfgrrhgrmhepmhgrihhlfhhrohhmpehpshesph hkshdrihhm X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 15 Feb 2024 03:25:40 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id dc9837de (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 15 Feb 2024 08:21:48 +0000 (UTC) Date: Thu, 15 Feb 2024 09:25:38 +0100 From: Patrick Steinhardt To: git@vger.kernel.org Cc: Karthik Nayak , Junio C Hamano Subject: [PATCH v2 3/7] t1400: exercise reflog with gaps with reftable backend Message-ID: References: Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: In t1400, we have a test that exercises whether we print a warning message as expected when the reflog contains entries which have a gap between the old entry's new object ID and the new entry's old object ID. While the logic should apply to all ref backends, the test setup writes into `.git/logs` directly and is thus "files"-backend specific. Refactor the test to instead use `git reflog delete` to create the gap and drop the REFFILES prerequisite. Signed-off-by: Patrick Steinhardt --- t/t1400-update-ref.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh index bf37763bd6..6ebc3ef945 100755 --- a/t/t1400-update-ref.sh +++ b/t/t1400-update-ref.sh @@ -426,15 +426,15 @@ test_expect_success 'Query "main@{2005-05-28}" (past end of history)' ' rm -f expect git update-ref -d $m -test_expect_success REFFILES 'query reflog with gap' ' +test_expect_success 'query reflog with gap' ' test_when_finished "git update-ref -d $m" && - git update-ref $m $F && - cat >.git/logs/$m <<-EOF && - $Z $A $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150320 -0500 - $A $B $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150380 -0500 - $D $F $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150680 -0500 - EOF + GIT_COMMITTER_DATE="1117150320 -0500" git update-ref $m $A && + GIT_COMMITTER_DATE="1117150380 -0500" git update-ref $m $B && + GIT_COMMITTER_DATE="1117150480 -0500" git update-ref $m $C && + GIT_COMMITTER_DATE="1117150580 -0500" git update-ref $m $D && + GIT_COMMITTER_DATE="1117150680 -0500" git update-ref $m $F && + git reflog delete $m@{2} && git rev-parse --verify "main@{2005-05-26 23:33:01}" >actual 2>stderr && echo "$B" >expect && From patchwork Thu Feb 15 08:25:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13557632 Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B70E313AC8 for ; Thu, 15 Feb 2024 08:25:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=66.111.4.27 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707985548; cv=none; b=WoFD4H9tvbas9NnTubFBDUoXruakvwkmabANFEDr6KZLU04FrHo9Ir+6lO9bUD6pmMe/6DgEDTBJB1rSV+YhpGmjm0AzfI1p3JBzsuFa6bpi382LF3WEpS5hThEIfHgXasah7NBwcdPQgVv5uoRJ+4rY5ot2NRFvyp7IMBdByc8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707985548; c=relaxed/simple; bh=G5L1wuwLq5fKmEYAyNx4ennCK7vR0hj+u2G7Iwz1NPM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ewYVKGFFbGeKFDxb8CizV3FRWXDoSXwh3Mhj8dzByk/u1IXnJOr60B5FfUD1xanwXednnTaef+KBoHHS9gVtVYHtiZii42PuDGRyFQKZ5IYBry/D6Np/66Mk0sj0pdCNgQPpZl0toU/DJEsYisFAdgH+wa9kIVeCQwA2+x4S898= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=bjwpguUk; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=WhW8m6gt; arc=none smtp.client-ip=66.111.4.27 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="bjwpguUk"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="WhW8m6gt" Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 9FFC45C0004; Thu, 15 Feb 2024 03:25:45 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Thu, 15 Feb 2024 03:25:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1707985545; x=1708071945; bh=bS4mabOu4s agSw7vttX41o6TLulkVtfFfpRgYsKMV/I=; b=bjwpguUksXg4aWb2AEai+3v8dj mFmQjKvEd8Gnyj2opYfrnMk3sMzMmRmck1GaAf0SB8eBsAiRtytORVRJibm+BVNS NEds+QPNYIWmMc2eNJqC5PRGgK4E5N8yz5e1aAHJKkIarI14bm0OuyK51rWbZT1W bQILfLCzb+MeHO8GbFYP2zHgtq0qVeXpVExuYKnxVEv6E8f/Bv29IUzTyYX9ebnW GH6KkqBkCTTOPKvyAQmt7uqWbtPV3zs1VWkyG1pyIB5eGuZuEXN1EzHOYiB0HH+u peWNLITt94oqprj4tzamDo18Uk1DZpZ+57pOAtvfL/CQ4c6iZqk3zrARMv0Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1707985545; x=1708071945; bh=bS4mabOu4sagSw7vttX41o6TLulk VtfFfpRgYsKMV/I=; b=WhW8m6gt9f+GjdydRPoKa4SoqkPKUvoYSzbMy+92IrvJ 6vhwi1b82DOCPL1w8WP1aMrKFCz3A0/06aR5/V1ycn95dHzmZG45OSpcKOZ6QJe3 5A9CUmsqlLUdxTjmOvoiR9/QRhcEG0x6fYZtezckHh70cbkppwlg/pOR8UwVLJcp ioZcylxt00ALz6oHt58XBCMnpGjdd/TpAaJ1bt3uJYV6qjJ+X7f0LUOtsZLkIknD lsEus+qHnu+AQ+AkaXdf6A9zekVWo1NfZ1lcMKjeDcpI+sG8hCjY7wXN4DCGZQB6 LoZ53Pb4SlbsSWletcxNu2PLGyi+Tj9rVT7aUYrm3w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudelgdeihecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvvefukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefrrghtrhhi tghkucfuthgvihhnhhgrrhguthcuoehpshesphhkshdrihhmqeenucggtffrrghtthgvrh hnpeeukedtvedtffevleejtefgheehieegkeeluddvfeefgeehgfeltddtheejleffteen ucevlhhushhtvghrufhiiigvpedvnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpshesph hkshdrihhm X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 15 Feb 2024 03:25:44 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id 07fe5bce (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 15 Feb 2024 08:21:52 +0000 (UTC) Date: Thu, 15 Feb 2024 09:25:42 +0100 From: Patrick Steinhardt To: git@vger.kernel.org Cc: Karthik Nayak , Junio C Hamano Subject: [PATCH v2 4/7] t1404: make D/F conflict tests compatible with reftable backend Message-ID: <212949689fb89397c909cf83cfb8670da6d7ca3a.1707985173.git.ps@pks.im> References: Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Some of the tests in t1404 exercise whether Git correctly aborts transactions when there is a directory/file conflict with ref names. While these tests are all marked to require the "files" backend, they do in fact apply to the "reftable" backend as well. This may not make much sense on the surface: D/F conflicts only exist because the "files" backend uses the filesystem to store loose refs, and thus the restriction theoretically shouldn't apply to the "reftable" backend. But for now, the "reftable" backend artificially restricts the creation of such conflicting refs so that it is a drop-in replacement for the "files" backend. This also ensures that the "reftable" backend can easily be used on the server side without causing issues for clients which only know to use the "files" backend. The only difference between the "files" and "reftable" backends is a slightly different error message. Adapt the tests to accomodate for this difference and remove the REFFILES prerequisite so that we start testing with both backends. Signed-off-by: Patrick Steinhardt --- t/t1404-update-ref-errors.sh | 37 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/t/t1404-update-ref-errors.sh b/t/t1404-update-ref-errors.sh index 00b7013705..98e9158bd2 100755 --- a/t/t1404-update-ref-errors.sh +++ b/t/t1404-update-ref-errors.sh @@ -92,9 +92,6 @@ df_test() { else delname="$delref" fi && - cat >expected-err <<-EOF && - fatal: cannot lock ref $SQ$addname$SQ: $SQ$delref$SQ exists; cannot create $SQ$addref$SQ - EOF $pack && if $add_del then @@ -103,7 +100,7 @@ df_test() { printf "%s\n" "delete $delname" "create $addname $D" fi >commands && test_must_fail git update-ref --stdin output.err && - test_cmp expected-err output.err && + grep "fatal:\( cannot lock ref $SQ$addname$SQ:\)\? $SQ$delref$SQ exists; cannot create $SQ$addref$SQ" output.err && printf "%s\n" "$C $delref" >expected-refs && git for-each-ref --format="%(objectname) %(refname)" $prefix/r >actual-refs && test_cmp expected-refs actual-refs @@ -191,69 +188,69 @@ test_expect_success 'one new ref is a simple prefix of another' ' ' -test_expect_success REFFILES 'D/F conflict prevents add long + delete short' ' +test_expect_success 'D/F conflict prevents add long + delete short' ' df_test refs/df-al-ds --add-del foo/bar foo ' -test_expect_success REFFILES 'D/F conflict prevents add short + delete long' ' +test_expect_success 'D/F conflict prevents add short + delete long' ' df_test refs/df-as-dl --add-del foo foo/bar ' -test_expect_success REFFILES 'D/F conflict prevents delete long + add short' ' +test_expect_success 'D/F conflict prevents delete long + add short' ' df_test refs/df-dl-as --del-add foo/bar foo ' -test_expect_success REFFILES 'D/F conflict prevents delete short + add long' ' +test_expect_success 'D/F conflict prevents delete short + add long' ' df_test refs/df-ds-al --del-add foo foo/bar ' -test_expect_success REFFILES 'D/F conflict prevents add long + delete short packed' ' +test_expect_success 'D/F conflict prevents add long + delete short packed' ' df_test refs/df-al-dsp --pack --add-del foo/bar foo ' -test_expect_success REFFILES 'D/F conflict prevents add short + delete long packed' ' +test_expect_success 'D/F conflict prevents add short + delete long packed' ' df_test refs/df-as-dlp --pack --add-del foo foo/bar ' -test_expect_success REFFILES 'D/F conflict prevents delete long packed + add short' ' +test_expect_success 'D/F conflict prevents delete long packed + add short' ' df_test refs/df-dlp-as --pack --del-add foo/bar foo ' -test_expect_success REFFILES 'D/F conflict prevents delete short packed + add long' ' +test_expect_success 'D/F conflict prevents delete short packed + add long' ' df_test refs/df-dsp-al --pack --del-add foo foo/bar ' # Try some combinations involving symbolic refs... -test_expect_success REFFILES 'D/F conflict prevents indirect add long + delete short' ' +test_expect_success 'D/F conflict prevents indirect add long + delete short' ' df_test refs/df-ial-ds --sym-add --add-del foo/bar foo ' -test_expect_success REFFILES 'D/F conflict prevents indirect add long + indirect delete short' ' +test_expect_success 'D/F conflict prevents indirect add long + indirect delete short' ' df_test refs/df-ial-ids --sym-add --sym-del --add-del foo/bar foo ' -test_expect_success REFFILES 'D/F conflict prevents indirect add short + indirect delete long' ' +test_expect_success 'D/F conflict prevents indirect add short + indirect delete long' ' df_test refs/df-ias-idl --sym-add --sym-del --add-del foo foo/bar ' -test_expect_success REFFILES 'D/F conflict prevents indirect delete long + indirect add short' ' +test_expect_success 'D/F conflict prevents indirect delete long + indirect add short' ' df_test refs/df-idl-ias --sym-add --sym-del --del-add foo/bar foo ' -test_expect_success REFFILES 'D/F conflict prevents indirect add long + delete short packed' ' +test_expect_success 'D/F conflict prevents indirect add long + delete short packed' ' df_test refs/df-ial-dsp --sym-add --pack --add-del foo/bar foo ' -test_expect_success REFFILES 'D/F conflict prevents indirect add long + indirect delete short packed' ' +test_expect_success 'D/F conflict prevents indirect add long + indirect delete short packed' ' df_test refs/df-ial-idsp --sym-add --sym-del --pack --add-del foo/bar foo ' -test_expect_success REFFILES 'D/F conflict prevents add long + indirect delete short packed' ' +test_expect_success 'D/F conflict prevents add long + indirect delete short packed' ' df_test refs/df-al-idsp --sym-del --pack --add-del foo/bar foo ' -test_expect_success REFFILES 'D/F conflict prevents indirect delete long packed + indirect add short' ' +test_expect_success 'D/F conflict prevents indirect delete long packed + indirect add short' ' df_test refs/df-idlp-ias --sym-add --sym-del --pack --del-add foo/bar foo ' From patchwork Thu Feb 15 08:25:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13557633 Received: from fhigh8-smtp.messagingengine.com (fhigh8-smtp.messagingengine.com [103.168.172.159]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B2B4513AC8 for ; Thu, 15 Feb 2024 08:25:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.159 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707985552; cv=none; b=sJzErl24diIhfv0FLHRSksDIfkysS4U9T4ZeIby6ZYSxqgrWqU6WUHmntconfJuKz5x/H+UDeRRR1wf2gr0j8gQIp4tHdsBHqMTh9a2bC6XlwJbFKk61MITWyxCh0rk7oTHy9Cr6520Dr0u/5fd+Z4+x5UXZcdCU4XILTl/uzFQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707985552; c=relaxed/simple; bh=W7uC73kaEkFfgIiGsN8jHkxxS+YI7WFWol16vsV3VZw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ZzYrvqk0QZnTBYeC2tbkl7O1e2E+6SRfGQ/3reiFg2HO1rar3FRg4BgWqYmRhYII4SoX8r/iQqF+/x8XPKK+qYceUvX/4W0rm7nCBamYAVLBm+6PM8iO4G5w8O/iWClU7D/UcpeeX73Uxgr29+9Xj7x1cf/NNPOkZis6fp7Xl2Q= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=Wh/0yJXn; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=r2GpxSC5; arc=none smtp.client-ip=103.168.172.159 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="Wh/0yJXn"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="r2GpxSC5" Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfhigh.nyi.internal (Postfix) with ESMTP id B41A711400AB; Thu, 15 Feb 2024 03:25:49 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Thu, 15 Feb 2024 03:25:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1707985549; x=1708071949; bh=UmXHXlcwqQ UUgpgQc6MKKXVjhXfguoiTT0++gZT32L0=; b=Wh/0yJXnRMQwqfNFkHc7MYDa/A 5eUZo4N3tid7O8TGqvH4rWXvQPE32cnD/XeFwfdUi4kLtKzFii7YdvRSyamLZtzi FLO4U3lZjKQECF2lCNatCpIZS8giPSP/uo9visFNuksKmYkNBz9hJhCKQK3o4oPZ BldMICmR632r4xQtD/dGo+GLhUx0bBG2FGvSkAfgrFv8ywbsAyiCRTVOOat6ybxT wULCZrVSY9ZSoO6h9ks4YdyImOjcdfczym4lx6VPHLPy86Q4TxUaNCsBge/rFCf8 SY9juPuELA6iy5KnaRHBU1QePpis93ZJXGI1fmPqheM3gk/Il8Z5kLS3bOGw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1707985549; x=1708071949; bh=UmXHXlcwqQUUgpgQc6MKKXVjhXfg uoiTT0++gZT32L0=; b=r2GpxSC5bRSHeG2M17D5SYjyNGeaO0VDccDU8kpRKnh0 6eoN6qy4r9wjaVPPuVSuNDfGh0eJOdS9fSFOoAOtVJ5UGDQai/6xfK8C3w0kC17c abaCFrmZeRJEwmfHK2UdkioyxYuSWy9dhzCFCmS78lIlImBblr+3tcfP2nnOFjZc lmzb8ytbcA+vuqBJoKfs/GByR2y+EbZlUXdJH9pa+2VWgtz4PV9H3quvrTZ9dCXQ k871hQnYuz8UJnv7S9JbyNZFEfb7ox8OAdycOicMXayazI7ElXrq77Yaed5x1bWO cGxOr0XY6roumJq+xw7JyxwjpljhmvrzVfbkjiwuhg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudelgdeihecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvvefukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefrrghtrhhi tghkucfuthgvihhnhhgrrhguthcuoehpshesphhkshdrihhmqeenucggtffrrghtthgvrh hnpeeukedtvedtffevleejtefgheehieegkeeluddvfeefgeehgfeltddtheejleffteen ucevlhhushhtvghrufhiiigvpeefnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpshesph hkshdrihhm X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 15 Feb 2024 03:25:48 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id 127e216f (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 15 Feb 2024 08:21:56 +0000 (UTC) Date: Thu, 15 Feb 2024 09:25:47 +0100 From: Patrick Steinhardt To: git@vger.kernel.org Cc: Karthik Nayak , Junio C Hamano Subject: [PATCH v2 5/7] t1405: remove unneeded cleanup step Message-ID: <67d6aede63bb1088d2d2eb86d4eb13b9ea702bda.1707985173.git.ps@pks.im> References: Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: 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 --- t/t1405-main-ref-store.sh | 6 ------ 1 file changed, 6 deletions(-) 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 && From patchwork Thu Feb 15 08:25:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13557634 Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9D67912B7C for ; Thu, 15 Feb 2024 08:25:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=66.111.4.27 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707985556; cv=none; b=htLsjj+9loPk/asbx2OOeJfyJGltpWwbQf4070N+ApLcuGdnThwHKEbBByCp+EfptqMspQoppJXsCtwTCDouZw8P4CwQLZ2jN4ggG595m/bruj90+Z3Yxi+VdcxA4jYKuSM27BUv1Ck74eJIvjXHwzSCBa+CWYNDmoSvSvBpmjo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707985556; c=relaxed/simple; bh=CuewBXxU0lzTsgHWiRaXNk4EpbMjCHo7noH4lzXLjZY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=DXP8dYUB2rVhDjCsCAymBvTBMmwiM3hd5q/SFYOCiyerLyq2BuMWq3f+glWizKXFMQ3Y8gcQsAnmrteSILlkLcNVlgVTzAuLGW8CLyHMhZ3sBsL9N7k4SVoZw5c6DwwyOPI0daB77qcazox3hrimrxG8HXPnbgeiENqcAiiUpq4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=oxn85g9z; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=MxzM4Pzt; arc=none smtp.client-ip=66.111.4.27 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="oxn85g9z"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="MxzM4Pzt" Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id B49175C00AF; Thu, 15 Feb 2024 03:25:53 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Thu, 15 Feb 2024 03:25:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1707985553; x=1708071953; bh=IMGrO2ywS0 jimCqZg9sHwGeGR7mHdKGOkTSDfFj0syg=; b=oxn85g9znBjlq0KZGqUzOiI8Ye xoFmzhX54tgiluJH1mnNhSQ9w79x7rJncOWCYHHsLdHu6Jzf4Lb2tv7eDSSCel8l aCOnBWEJ/B8Pk4HMfpChdPrhmzzmbACHPAXpxhGX6h+vOTherWL2fopQHbj7G4uY J0ilvu7wqA1C7YFAaiAoU9gcoIMnlIp3ROODfckhcg/LnWfyBzb2Zo7yagCLTLYj XSswbnc5Ev6tk1inEz1ZTA1Xzw0AjBfRUgBILahHyNRJtqq8IEaXaB1DbYSCG9ga KIiS5JNivOhXGJlTmfNEPXHpGWSVSQLW8oY1+IY5FVMKd0DtqCevbIHxr/yQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1707985553; x=1708071953; bh=IMGrO2ywS0jimCqZg9sHwGeGR7mH dKGOkTSDfFj0syg=; b=MxzM4PztdmOaO+rXR/jH4OWkRC/ALke/E7Lhh3sRn/4n WBRakh65SVxRefWC3bsOtGbFCRlO6i9AYmCKvU3vfkii85uy/zgMRy707V7H/L4W FGR5S2EWuwietJZdJ7jv7RD41BzmMsj2/TmeALHxI7gn3hSipvec7+qKnSj/oS6P 2J/ucH9XpXPV1yMijBWuSOhvi9gl91vPRdGIbZu5zbWEKzV9xiQRNFxSYKubENN8 kM5NysZMRddV5TzB2gw2mNz99N+ACfDzspkGhB+xc3xxmm6cTZ3ejnFm4PMyzbX8 6E4YYFjJX2sp/Cep4movJS4lWd917bmu1qGkfMxqlw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudelgdeigecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvvefukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefrrghtrhhi tghkucfuthgvihhnhhgrrhguthcuoehpshesphhkshdrihhmqeenucggtffrrghtthgvrh hnpeeukedtvedtffevleejtefgheehieegkeeluddvfeefgeehgfeltddtheejleffteen ucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpshesph hkshdrihhm X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 15 Feb 2024 03:25:52 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id 0aaeea14 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 15 Feb 2024 08:22:01 +0000 (UTC) Date: Thu, 15 Feb 2024 09:25:51 +0100 From: Patrick Steinhardt To: git@vger.kernel.org Cc: Karthik Nayak , Junio C Hamano Subject: [PATCH v2 6/7] t2011: exercise D/F conflicts with HEAD with the reftable backend Message-ID: <24051cc246b9d515ee2ea0418e751e47629d7662.1707985173.git.ps@pks.im> References: Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Some of the tests in t2011 exercise whether it is possible to move away from a symbolic HEAD ref whose target ref has a directory-file conflict with another, preexisting ref. These tests don't use git-symbolic-ref(1) but manually write HEAD. This is supposedly done to avoid using logic that we're about to exercise, but it makes it impossible to verify whether the logic also works for ref backends other than "files". Refactor the code to use git-symbolic-ref(1) instead so that the tests work with the "reftable" backend, as well. We already have lots of tests in t1404 that ensure that both git-update-ref(1) and git-symbolic-ref(1) work in such a scenario, so it should be safe to rely on it here. Signed-off-by: Patrick Steinhardt --- t/t2011-checkout-invalid-head.sh | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/t/t2011-checkout-invalid-head.sh b/t/t2011-checkout-invalid-head.sh index 3c8135831b..04f53b1ea1 100755 --- a/t/t2011-checkout-invalid-head.sh +++ b/t/t2011-checkout-invalid-head.sh @@ -29,36 +29,33 @@ test_expect_success REFFILES 'checkout notices failure to lock HEAD' ' test_must_fail git checkout -b other ' -test_expect_success REFFILES 'create ref directory/file conflict scenario' ' +test_expect_success 'create ref directory/file conflict scenario' ' git update-ref refs/heads/outer/inner main && - - # do not rely on symbolic-ref to get a known state, - # as it may use the same code we are testing reset_to_df () { - echo "ref: refs/heads/outer" >.git/HEAD + git symbolic-ref HEAD refs/heads/outer } ' -test_expect_success REFFILES 'checkout away from d/f HEAD (unpacked, to branch)' ' +test_expect_success 'checkout away from d/f HEAD (unpacked, to branch)' ' reset_to_df && git checkout main ' -test_expect_success REFFILES 'checkout away from d/f HEAD (unpacked, to detached)' ' +test_expect_success 'checkout away from d/f HEAD (unpacked, to detached)' ' reset_to_df && git checkout --detach main ' -test_expect_success REFFILES 'pack refs' ' +test_expect_success 'pack refs' ' git pack-refs --all --prune ' -test_expect_success REFFILES 'checkout away from d/f HEAD (packed, to branch)' ' +test_expect_success 'checkout away from d/f HEAD (packed, to branch)' ' reset_to_df && git checkout main ' -test_expect_success REFFILES 'checkout away from d/f HEAD (packed, to detached)' ' +test_expect_success 'checkout away from d/f HEAD (packed, to detached)' ' reset_to_df && git checkout --detach main ' From patchwork Thu Feb 15 08:25:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13557635 Received: from fout6-smtp.messagingengine.com (fout6-smtp.messagingengine.com [103.168.172.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A8C4014002 for ; Thu, 15 Feb 2024 08:25:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.149 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707985560; cv=none; b=la7sOwkNGh6SknEZ7LTbWJs+H5ezBay98eMkBUJ49VWy07PEciIr/kUn4r2I+Nfurcs14KMpcoDOTUZ7nIANpoDAMAPhBdcnMJtd4eY5RVywcXWsNy1HjR+pADTyyDrezb1m03ai3r8A7JK7/Zcmw0fYIjDFQ7HfZMLyEm6WXqA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707985560; c=relaxed/simple; bh=X15oyPW34DPJLaU+4ODY1+rASEZxHwUEkNhQjfOebD8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=lkg6Sj9/8LpPAqRDz+HNcsyqPnZ7RI0ts7CihhIhhqPwHFlAsO1YjPxg2NMQ5oe9wnUHefLWRaSxb4HQSM+ZQ/F2zkBZ4kHfhSUUGn5muMlscRDRyR9UlvzqAUwA1pIiP+7AipziM6w+ZByI3mHor+bQ6Slet62gaEdcaBz+2gs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=i/qvWkxA; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=NfdTDM9N; arc=none smtp.client-ip=103.168.172.149 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="i/qvWkxA"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="NfdTDM9N" Received: from compute7.internal (compute7.nyi.internal [10.202.2.48]) by mailfout.nyi.internal (Postfix) with ESMTP id A8F1013800B0; Thu, 15 Feb 2024 03:25:57 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Thu, 15 Feb 2024 03:25:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1707985557; x=1708071957; bh=20P3PiEWmH udXQQfqGoB4cSiEj7sk26CMyIu0K/FCJc=; b=i/qvWkxACqwOpOI9wALZip4C10 CTPid2SRzZJZVRcxup+1ZpPrI3GNono01zRzh8N8kWq+KWH5IPnRAWsZs4+kdblD iSgZg/Yf81Z8T6Hcj0z2vWCFRVAfHD1wX+6lZMPYyeoBb+fXtoY7Y6jaiLgB12Du Xtu2VpJWznM0txxKHZQJ5xsRWkIouxQrb9vm9RSB3hKuZfSKCxGqUA3xN0VuCNlZ ZOdq2QDnjUmislNbdFzzQP6buyS/gHSYbUmAS8oYIkmayZdDKnYzV5lDn3ubk2Rs UTIBrep7fC1WBAWh3Z3UrJVNfDjfQ/C9F4CL8yY14YYjwcTLWwpqnkWXAfOQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1707985557; x=1708071957; bh=20P3PiEWmHudXQQfqGoB4cSiEj7s k26CMyIu0K/FCJc=; b=NfdTDM9NnZIUQ7EqzOycwvnxTcbveHvjreaQ/zReofsE Y3zaA7ZV2yeJbbV1JqZfk0I4uL3llykwuvBNHIXvprELO0ohvgaRbwWz59xkSvKj Bd68DYT2kla1H/ECHJ+jGj9D/UFbzV8gzPxzGXwI3aZRlDp6jtloV3v39S3PIgoy uei4oOGNYxfrvMCvc25XtFqA6lcgpILKtJEqns6Esd3BDW/cD7cdm0+kQ37trmkn w4JyudL3b25WnCIyIfax0UgYstnFSn2ZqV5IyEHil2PSxzDDcxc8SxGylM0SvMTo Y9RysVWpp8HXNePV3xvVjNhbLgEfHkxU1cL72FdbVw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudelgdeihecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvvefukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefrrghtrhhi tghkucfuthgvihhnhhgrrhguthcuoehpshesphhkshdrihhmqeenucggtffrrghtthgvrh hnpeeukedtvedtffevleejtefgheehieegkeeluddvfeefgeehgfeltddtheejleffteen ucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpshesph hkshdrihhm X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 15 Feb 2024 03:25:56 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id a09d9a0d (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 15 Feb 2024 08:22:05 +0000 (UTC) Date: Thu, 15 Feb 2024 09:25:55 +0100 From: Patrick Steinhardt To: git@vger.kernel.org Cc: Karthik Nayak , Junio C Hamano Subject: [PATCH v2 7/7] t7003: ensure filter-branch prunes reflogs with the reftable backend Message-ID: <8fb6de37ce20bedcea6df9018e5a8a75eefb48c8.1707985173.git.ps@pks.im> References: Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: In t7003 we conditionally check whether the reflog for branches pruned by git-filter-branch(1) get deleted based on whether or not we use the "files" backend. Same as with the preceding commit, this condition was added because in its initial iteration the "reftable" backend did not delete reflogs when their corresponding ref was deleted. Since then, the backend has been aligned to behave the same as the "files" backend though, which makes this check unnecessary. Remove it. Signed-off-by: Patrick Steinhardt --- t/t7003-filter-branch.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/t/t7003-filter-branch.sh b/t/t7003-filter-branch.sh index f6aebe92ff..5ab4d41ee7 100755 --- a/t/t7003-filter-branch.sh +++ b/t/t7003-filter-branch.sh @@ -396,10 +396,7 @@ test_expect_success '--prune-empty is able to prune entire branch' ' git branch prune-entire B && git filter-branch -f --prune-empty --index-filter "git update-index --remove A.t B.t" prune-entire && test_must_fail git rev-parse refs/heads/prune-entire && - if test_have_prereq REFFILES - then - test_must_fail git reflog exists refs/heads/prune-entire - fi + test_must_fail git reflog exists refs/heads/prune-entire ' test_expect_success '--remap-to-ancestor with filename filters' '