From: Ian Jackson Date: Sun, 7 Jun 2015 12:43:15 +0000 (+0100) Subject: Test suite: Prepare for pipefail in t-git-get-ref X-Git-Tag: debian/0.30~104 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=2f3ee9be4c7e6a8685113d8d027811d3db3cd573 Test suite: Prepare for pipefail in t-git-get-ref --- diff --git a/tests/lib b/tests/lib index e960c1c6..a0a84dda 100644 --- a/tests/lib +++ b/tests/lib @@ -245,7 +245,7 @@ t-git-get-ref () { refs/*) ;; *) fail "t-git-get-ref bad $ref" ;; esac - git show-ref -d $1 | perl -ne ' + (git show-ref -d $1 || test $? = 1) | perl -ne ' $x = $1 if m#^(\w+) \Q'$1'\E(?:\^\{\})?$#; END { print "$x\n" if length $x; } '