]> git.ipfire.org Git - thirdparty/git.git/commit - t/t1400-update-ref.sh
t: convert tests to not access reflog via the filesystem
authorPatrick Steinhardt <ps@pks.im>
Thu, 2 Nov 2023 08:46:53 +0000 (09:46 +0100)
committerJunio C Hamano <gitster@pobox.com>
Thu, 2 Nov 2023 23:37:06 +0000 (08:37 +0900)
commit668e31c690b821b9aba0fc6d11f483b1d154682a
tree9b573a03ef7167145d2e291f2424bbce92ddba93
parent239371168173da9a9556617fced1e053ac618a85
t: convert tests to not access reflog via the filesystem

Some of our tests reach directly into the filesystem in order to both
read or modify the reflog, which will break once we have a second
reference backend in our codebase that stores reflogs differently.

Refactor these tests to either use git-reflog(1) or the ref-store test
helper. Note that the refactoring to use git-reflog(1) also requires us
to adapt our expectations in some cases where we previously verified the
exact on-disk log entries. This seems like an acceptable tradeoff though
to ensure that different backends have the same user-visible behaviour
as any user would typically use git-reflog(1) anyway to access the logs.
Any backend-specific verification of the written on-disk format should
be implemented in a separate, backend-specific test.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t1400-update-ref.sh
t/t3200-branch.sh