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:
authorHan-Wen Nienhuys <hanwen@google.com>2021-05-31 19:56:22 +0300
committerJunio C Hamano <gitster@pobox.com>2021-06-02 04:01:54 +0300
commit1142746cbbf016fe2568076d6f30b2b73b29e731 (patch)
treef43a5bd9f699e66c24347989cc839e2aded01b16 /t/t1413-reflog-detach.sh
parentb1259ecff9a51de22ac8a70fc26c20dde8a18f80 (diff)
t1413: use tar to save and restore entire .git directory
This makes the test independent of the particulars of the storage formats. Signed-off-by: Han-Wen Nienhuys <hanwen@google.com> Reviewed-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1413-reflog-detach.sh')
-rwxr-xr-xt/t1413-reflog-detach.sh5
1 files changed, 2 insertions, 3 deletions
diff --git a/t/t1413-reflog-detach.sh b/t/t1413-reflog-detach.sh
index bde05208ae..934688a1ee 100755
--- a/t/t1413-reflog-detach.sh
+++ b/t/t1413-reflog-detach.sh
@@ -7,8 +7,7 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
. ./test-lib.sh
reset_state () {
- git checkout main &&
- cp saved_reflog .git/logs/HEAD
+ rm -rf .git && "$TAR" xf .git-saved.tar
}
test_expect_success setup '
@@ -17,7 +16,7 @@ test_expect_success setup '
git branch side &&
test_tick &&
git commit --allow-empty -m second &&
- cat .git/logs/HEAD >saved_reflog
+ "$TAR" cf .git-saved.tar .git
'
test_expect_success baseline '