diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2015-06-10 21:29:52 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2015-06-10 21:29:52 +0100 |
commit | 2212a3b83e5e983a6d2b65a491287fa3d6bdbbbc (patch) | |
tree | 166361692c5608692011ec333019537ae3702b9d /tests/lib | |
parent | 26b8f62b600642b1a469a305c3ed8bc0a165a255 (diff) |
Test suite: t-expect-push-fail checks HEAD object did not arrive
Diffstat (limited to 'tests/lib')
-rw-r--r-- | tests/lib | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -74,15 +74,22 @@ t-expect-fail () { t-expect-push-fail () { local mpat="$1"; shift + + local triedpush=`git rev-parse HEAD` + t-reporefs pre-push t-expect-fail "$mpat" "$@" t-reporefs post-push diff $tmp/show-refs.{pre,post}-push + t-git-objects-not-present '' $triedpush + eval "$t_expect_push_fail_hook" } t-git-objects-not-present () { + # t-git-objects-not-present GITDIR|'' OBJID [...] + # specifying '' means the repo for package $p local gitdir="${1-$tmp/git/$p.git}" local obj if ! [ -e "$gitdir" ]; then return; fi |