mirror of
https://github.com/git/git.git
synced 2024-11-27 03:53:55 +08:00
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>
This commit is contained in:
parent
88121d9371
commit
7e1fcb81ee
@ -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 &&
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user