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:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2009-07-23 19:33:45 +0400
committerJunio C Hamano <gitster@pobox.com>2009-07-24 09:07:51 +0400
commit1ec648278e3a3e5a04dfaac916f68e2f675ff9ea (patch)
tree63220a7c1f176e7bcf93e04427bc81cda77f353b /t/t7700-repack.sh
parent735c674416b87505400fcf738fd3a38b52f0eccb (diff)
Add a test showing that 'git repack' throws away grafted-away parents
Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7700-repack.sh')
-rwxr-xr-xt/t7700-repack.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t7700-repack.sh b/t/t7700-repack.sh
index 87c9b0e121..a4dddb728f 100755
--- a/t/t7700-repack.sh
+++ b/t/t7700-repack.sh
@@ -149,5 +149,17 @@ test_expect_success 'local packed unreachable obs that exist in alternate ODB ar
test_must_fail git show $csha1
'
+test_expect_failure 'objects made unreachable by grafts only are kept' '
+ test_tick &&
+ git commit --allow-empty -m "commit 4" &&
+ H0=$(git rev-parse HEAD) &&
+ H1=$(git rev-parse HEAD^) &&
+ H2=$(git rev-parse HEAD^^) &&
+ echo "$H0 $H2" > .git/info/grafts &&
+ git reflog expire --expire=now --expire-unreachable=now --all &&
+ git repack -a -d &&
+ git cat-file -t $H1
+ '
+
test_done