Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Add a test showing that 'git repack' throws away grafted-away parents
author
Björn Steinbrink
<B.Steinbrink@gmx.de>
Thu, 23 Jul 2009 15:33:45 +0000
(17:33 +0200)
committer
Junio C Hamano
<gitster@pobox.com>
Fri, 24 Jul 2009 05:07:51 +0000
(22:07 -0700)
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>
t/t7700-repack.sh
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
735c674
)
diff --git
a/t/t7700-repack.sh
b/t/t7700-repack.sh
index 87c9b0e121db6c8ab7074e6c4968cd06d37851fe..a4dddb728f1a580f31df67eafa759d8bddf939e2 100755
(executable)
--- 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