diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2017-01-06 18:09:54 +0000 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2017-01-06 18:32:14 +0000 |
commit | 82ba0c6c552997a376968218d5e558fe491dfc6b (patch) | |
tree | 9281e3a94f65d0c6998e6e730561116366a6adae /tests/tests/badcommit-rewrite | |
parent | 1bdb8dcb25eb15fd197f6466c15105dccf11c52b (diff) |
test suite: New test for history-rewriting
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'tests/tests/badcommit-rewrite')
-rwxr-xr-x | tests/tests/badcommit-rewrite | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/tests/badcommit-rewrite b/tests/tests/badcommit-rewrite new file mode 100755 index 0000000..bcec8e6 --- /dev/null +++ b/tests/tests/badcommit-rewrite @@ -0,0 +1,36 @@ +#!/bin/bash +set -e +. tests/lib + +t-setup-import examplegit + +cd example + +suite=stable + +t-commit 'No changes, just send to stable' '' stable + +t-make-badcommit +git reset --hard $badcommit + +t-dgit -wgf build +t-dgit push --overwrite=1.2 stable +t-archive-process-incoming stable + +rstable=refs/remotes/dgit/dgit/stable + +t-dgit fetch stable +t-has-parent-or-is $rstable $badcommit + +cd $tmp/git/$p.git +${DGIT_BADCOMMIT_FIXUP} --real + +cd $tmp/$p +${DGIT_BADCOMMIT_FIXUP} --real + +t-dgit fetch stable + +t-expect-fail "child $rstable lacks parent $badcommit" \ +t-has-parent-or-is $rstable $badcommit + +t-ok |