ref-filter: rename the 'strip' option to 'lstrip'
[gitweb.git] / t / t5308-pack-detect-duplicates.sh
index 04fe242410ceaf5438734a3fba0cd5baa3eaa085..9c5a8766ab0af40382b83cf3340b13a32f7f0c8e 100755 (executable)
@@ -70,4 +70,11 @@ test_expect_success 'lookup in duplicated pack (GIT_USE_LOOKUP)' '
        test_cmp expect actual
 '
 
+test_expect_success 'index-pack can reject packs with duplicates' '
+       clear_packs &&
+       create_pack dups.pack 2 &&
+       test_must_fail git index-pack --strict --stdin <dups.pack &&
+       test_expect_code 1 git cat-file -e $LO_SHA1
+'
+
 test_done