diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-20 05:14:36 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-20 05:14:36 +0000 |
commit | 037de004c68d704abf839eebe075c58c9603f8f3 (patch) | |
tree | 7ac13a7fbb70193e7d04fc193f75de839e914d45 /t/t1417-reflog-updateref.sh | |
parent | Adding upstream version 1:2.43.0. (diff) | |
download | git-upstream/1%2.45.1.tar.xz git-upstream/1%2.45.1.zip |
Adding upstream version 1:2.45.1.upstream/1%2.45.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 't/t1417-reflog-updateref.sh')
-rwxr-xr-x | t/t1417-reflog-updateref.sh | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/t/t1417-reflog-updateref.sh b/t/t1417-reflog-updateref.sh index 14f13b5..0eb5e67 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 && |