Documentation: AsciiDoc spells em-dash as double-dashes, not triple
[gitweb.git] / t / t7701-repack-unpack-unreachable.sh
index b8d4cdea8cc661e27367bc942587b3b80b433051..aad8a9c64dda7c0886a40343f07411a90977a37d 100755 (executable)
@@ -109,4 +109,17 @@ test_expect_success 'do not bother loosening old objects' '
        test_must_fail git cat-file -p $obj2
 '
 
+test_expect_success 'keep packed objects found only in index' '
+       echo my-unique-content >file &&
+       git add file &&
+       git commit -m "make it reachable" &&
+       git gc &&
+       git reset HEAD^ &&
+       git reflog expire --expire=now --all &&
+       git add file &&
+       test-chmtime =-86400 .git/objects/pack/* &&
+       git gc --prune=1.hour.ago &&
+       git cat-file blob :file
+'
+
 test_done