From: Ian Jackson Date: Thu, 5 Jan 2017 14:01:38 +0000 (+0000) Subject: Merge tag dgit/2.14 into `defence in dgit-repos-server' branch X-Git-Tag: debian/2.15~4 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=6b959bf443c37b26f058aed813885c469c660828;hp=-c Merge tag dgit/2.14 into `defence in dgit-repos-server' branch Fix up semantic conflict: the new git-fsck test (in 2.14) fails on the new broken commits (in the `defence in dgit-repos-server' branch). We need to disable this. Ideally we would make a tighter test, but that's too much to do in a merge. Signed-off-by: Ian Jackson --- 6b959bf443c37b26f058aed813885c469c660828 diff --combined debian/changelog index 6d0b6137,832253f2..bfbffd5f --- a/debian/changelog +++ b/debian/changelog @@@ -1,9 -1,14 +1,20 @@@ - dgit (2.14) unstable; urgency=low ++dgit (2.15~) unstable; urgency=low + + * + + -- + + dgit (2.14) unstable; urgency=critical + + CRITICAL BUGFIX: + * Do not generate bogus commits with --overwrite or import-dsc. + Closes:#849041. + + Test suite: + * Run a lot of git-fsck. + + -- Ian Jackson Wed, 04 Jan 2017 22:52:55 +0000 + dgit (2.13) unstable; urgency=high Changed behaviour: diff --combined tests/lib index d075bc76,579ddda3..5fcb6f65 --- a/tests/lib +++ b/tests/lib @@@ -349,6 -349,25 +349,25 @@@ t-git-dir-check () esac } + t-git-fsck () { - git fsck --no-dangling --strict ++ git fsck --no-dangling --strict || ${expect_fsck_fail-false} + } + + t-fscks () { + ( + shopt -s nullglob + for d in $tmp/*/.git $tmp/git/*.git; do + cd "$d" + t-git-fsck + done + ) + } + + t-ok () { + t-fscks + echo ok. + } + t-rm-dput-dropping () { rm -f $tmp/${p}_${v}_*.upload } diff --combined tests/tests/drs-push-rejects index 7b7c5f32,f829dc91..dee14b86 --- a/tests/tests/drs-push-rejects +++ b/tests/tests/drs-push-rejects @@@ -139,18 -139,6 +139,18 @@@ mkta mustfail 'tag name in tag is wrong' \ refs/tags/$tagpfx/wombat:refs/tags/$tagpfx/$version $push_spec1 +echo ==== +badcommit=$( + git cat-file commit HEAD | \ + perl -pe 's/^committer.*\n//' | \ + git hash-object -w -t commit --stdin +) +git checkout -b broken $badcommit +prep unstable sid +mktag +mustfail "corrupted object $badcommit" $push_spec + +git checkout dgit/sid prep unstable sid mktag mustsucceed $push_spec # succeeds @@@ -203,4 -191,4 +203,7 @@@ mustfail "not in permissions list altho prep_dm_mangle '' mustsucceed $push_spec # succeeds - echo ok. ++# we generate some junk, so we must tolerate git-fsck complaining ++expect_fsck_fail=true ++ + t-ok