chiark
/
gitweb
/
~ianmdlvl
/
dgit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
test suite: Honour DGIT_SCHROOT_CHROOT to set the schroot to use for the sbuild tests.
[dgit.git]
/
tests
/
tests
/
badcommit-rewrite
diff --git
a/tests/tests/badcommit-rewrite
b/tests/tests/badcommit-rewrite
index b7fc7011d087019fc677f51f46f38cb5d9147048..3e2f37e71da47ab893a671e8dfa147a6283bb6d3 100755
(executable)
--- a/
tests/tests/badcommit-rewrite
+++ b/
tests/tests/badcommit-rewrite
@@
-5,7
+5,12
@@
set -e
t-setup-import examplegit
t-tstunt-parsechangelog
t-setup-import examplegit
t-tstunt-parsechangelog
-cd example
+cd $tmp/git/$p.git
+git config core.sharedRepository true
+chmod -R g+w objects
+umask 022
+
+cd $tmp/example
suite=stable
suite=stable
@@
-26,6
+31,9
@@
t-has-parent-or-is $rstable $badcommit
fixup=${DGIT_BADCOMMIT_FIXUP-dgit-badcommit-fixup}
cd $tmp/git/$p.git
fixup=${DGIT_BADCOMMIT_FIXUP-dgit-badcommit-fixup}
cd $tmp/git/$p.git
+git gc --aggressive --prune=all
+rmdir objects/* ||:
+
$fixup --real
cd $tmp/$p
$fixup --real
cd $tmp/$p
@@
-44,4
+52,11
@@
t-dgit fetch stable
t-expect-fail "child $rstable lacks parent $badcommit" \
t-has-parent-or-is $rstable $badcommit
t-expect-fail "child $rstable lacks parent $badcommit" \
t-has-parent-or-is $rstable $badcommit
+check_shared () {
+ find "$1" -perm -200 \! -perm -020 -ls |tee $tmp/badperm
+ test -f $tmp/badperm -a ! -s $tmp/badperm
+}
+
+check_shared $tmp/git/$p.git/objects
+
t-ok
t-ok