summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-06-13 19:50:46 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-06-13 19:50:46 (GMT)
commit549ca8aa7ce73fa3d4d5daabc8929d09b92c4763 (patch)
tree3c98a07afad31265b01da6d226fa397a3d1e71d9 /t
parent4d605b0f38775066be0eaed33c52e0b716035498 (diff)
parent3737746120d4e16b3a2b3431e34eeb3314edfa8c (diff)
downloadgit-549ca8aa7ce73fa3d4d5daabc8929d09b92c4763.zip
git-549ca8aa7ce73fa3d4d5daabc8929d09b92c4763.tar.gz
git-549ca8aa7ce73fa3d4d5daabc8929d09b92c4763.tar.bz2
Merge branch 'jk/index-pack-maint'
"index-pack --strict" has been taught to make sure that it runs the final object integrity checks after making the freshly indexed packfile available to itself. * jk/index-pack-maint: index-pack: correct install_packed_git() args index-pack: handle --strict checks of non-repo packs prepare_commit_graft: treat non-repository as a noop
Diffstat (limited to 't')
-rwxr-xr-xt/t5300-pack-object.sh6
-rwxr-xr-xt/t7415-submodule-names.sh10
2 files changed, 16 insertions, 0 deletions
diff --git a/t/t5300-pack-object.sh b/t/t5300-pack-object.sh
index 87a590c..2336d09 100755
--- a/t/t5300-pack-object.sh
+++ b/t/t5300-pack-object.sh
@@ -421,6 +421,12 @@ test_expect_success 'index-pack <pack> works in non-repo' '
test_path_is_file foo.idx
'
+test_expect_success 'index-pack --strict <pack> works in non-repo' '
+ rm -f foo.idx &&
+ nongit git index-pack --strict ../foo.pack &&
+ test_path_is_file foo.idx
+'
+
test_expect_success !PTHREADS,C_LOCALE_OUTPUT 'index-pack --threads=N or pack.threads=N warns when no pthreads' '
test_must_fail git index-pack --threads=2 2>err &&
grep ^warning: err >warnings &&
diff --git a/t/t7415-submodule-names.sh b/t/t7415-submodule-names.sh
index 3c0f1a1..b68c5f5 100755
--- a/t/t7415-submodule-names.sh
+++ b/t/t7415-submodule-names.sh
@@ -122,6 +122,16 @@ test_expect_success 'transfer.fsckObjects handles odd pack (index)' '
test_must_fail git -C dst.git index-pack --strict --stdin <odd.pack
'
+test_expect_success 'index-pack --strict works for non-repo pack' '
+ rm -rf dst.git &&
+ git init --bare dst.git &&
+ cp odd.pack dst.git &&
+ test_must_fail git -C dst.git index-pack --strict odd.pack 2>output &&
+ # Make sure we fail due to bad gitmodules content, not because we
+ # could not read the blob in the first place.
+ grep gitmodulesName output
+'
+
test_expect_success 'fsck detects symlinked .gitmodules file' '
git init symlink &&
(