Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2023-11-29 10:24:57 +0300
committerJunio C Hamano <gitster@pobox.com>2023-12-03 05:50:24 +0300
commit7e1fcb81eef3be73890d7c469da508b9bf3327b5 (patch)
tree905afde8f5c26b9a667e634b114537a5458c8618 /t/t1417-reflog-updateref.sh
parent88121d93714507fe8bb0bddfaffe0bf4a0a88a36 (diff)
t1417: make `reflog --updateref` tests backend agnostic
The tests for `git reflog delete --updateref` are currently marked to only run with the reffiles backend. There is no inherent reason that this should be the case other than the fact that the setup messes with the on-disk reflogs directly. Refactor the test to stop doing so and drop the REFFILES prerequisite. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1417-reflog-updateref.sh')
-rwxr-xr-xt/t1417-reflog-updateref.sh10
1 files changed, 7 insertions, 3 deletions
diff --git a/t/t1417-reflog-updateref.sh b/t/t1417-reflog-updateref.sh
index 14f13b57c6..0eb5e674bc 100755
--- a/t/t1417-reflog-updateref.sh
+++ b/t/t1417-reflog-updateref.sh
@@ -14,9 +14,13 @@ test_expect_success 'setup' '
test_commit B &&
test_commit C &&
- cp .git/logs/HEAD HEAD.old &&
+ git reflog HEAD >expect &&
git reset --hard HEAD~ &&
- cp HEAD.old .git/logs/HEAD
+ # Make sure that the reflog does not point to the same commit
+ # as HEAD.
+ git reflog delete HEAD@{0} &&
+ git reflog HEAD >actual &&
+ test_cmp expect actual
)
'
@@ -25,7 +29,7 @@ test_reflog_updateref () {
shift
args="$@"
- test_expect_success REFFILES "get '$exp' with '$args'" '
+ test_expect_success "get '$exp' with '$args'" '
test_when_finished "rm -rf copy" &&
cp -R repo copy &&