summaryrefslogtreecommitdiff
path: root/t/t3404-rebase-interactive.sh
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2023-11-02 08:46:45 (GMT)
committerJunio C Hamano <gitster@pobox.com>2023-11-02 23:37:06 (GMT)
commit1c6667cb9dab6f90dcc3381676b50b1f131aeda5 (patch)
tree6ea16916ee239d9d940805050d0dcfd0d16477d4 /t/t3404-rebase-interactive.sh
parent9ddd5b883b0221d80392a914eb621ea680476e75 (diff)
downloadgit-1c6667cb9dab6f90dcc3381676b50b1f131aeda5.zip
git-1c6667cb9dab6f90dcc3381676b50b1f131aeda5.tar.gz
git-1c6667cb9dab6f90dcc3381676b50b1f131aeda5.tar.bz2
t: convert tests to not write references via the filesystem
Some of our tests manually create, update or delete references by writing the respective new values into the filesystem directly. While this works with the current files reference backend, this will break once we have a second reference backend implementation in our codebase. Refactor these tests to instead use git-update-ref(1) or our `ref-store` test tool. The latter is required in some cases where safety checks of git-update-ref(1) would otherwise reject a reference update. While at it, refactor some of the tests to schedule the cleanup command via `test_when_finished` before modifying the repository. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3404-rebase-interactive.sh')
-rwxr-xr-xt/t3404-rebase-interactive.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
index 8ea2bf1..d2a7a91 100755
--- a/t/t3404-rebase-interactive.sh
+++ b/t/t3404-rebase-interactive.sh
@@ -2160,7 +2160,7 @@ test_expect_success '--update-refs: check failed ref update' '
# recorded in the update-refs file. We will force-update the
# "second" ref, but "git branch -f" will not work because of
# the lock in the update-refs file.
- git rev-parse third >.git/refs/heads/second &&
+ git update-ref refs/heads/second third &&
test_must_fail git rebase --continue 2>err &&
grep "update_ref failed for ref '\''refs/heads/second'\''" err &&