summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/tests/drs-push-rejects11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/tests/drs-push-rejects b/tests/tests/drs-push-rejects
index 9b2a08b..f6b5880 100755
--- a/tests/tests/drs-push-rejects
+++ b/tests/tests/drs-push-rejects
@@ -10,8 +10,17 @@ t-worktree drs
cd $p
+reporefs () {
+ (set -e
+ if test -d $tmp/git/$p.git; then
+ cd $tmp/git/$p.git
+ git show-ref
+ fi)
+}
+
mustfail () {
local wantmsg="$1"; shift
+ reporefs >$tmp/show-refs.pre-push
set +e
git push origin "$@" 2>&1 |tee $tmp/mustfail.txt
ps="${PIPESTATUS[*]}"
@@ -24,6 +33,8 @@ mustfail () {
if ! fgrep "$wantmsg" $tmp/mustfail.txt >/dev/null; then
fail "error message not found"
fi
+ reporefs >$tmp/show-refs.post-push
+ diff $tmp/show-refs.{pre,post}-push
}
prep () {