summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2015-06-07 13:43:15 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2015-06-07 13:45:49 +0100
commit2f3ee9be4c7e6a8685113d8d027811d3db3cd573 (patch)
tree6b3004ed6b92dba93056ea2722da510b5ba418cb /tests
parentd05936fa35e8fccc8b9eead88379fcdaa2021277 (diff)
Test suite: Prepare for pipefail in t-git-get-ref
Diffstat (limited to 'tests')
-rw-r--r--tests/lib2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/lib b/tests/lib
index e960c1c..a0a84dd 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; }
'