chiark
/
gitweb
/
~ianmdlvl
/
dgit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d05936f
)
Test suite: Prepare for pipefail in t-git-get-ref
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sun, 7 Jun 2015 12:43:15 +0000
(13:43 +0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sun, 7 Jun 2015 12:45:49 +0000
(13:45 +0100)
tests/lib
patch
|
blob
|
history
diff --git
a/tests/lib
b/tests/lib
index e960c1c62c33f60c76a27f83cd212aac0b8fcc2a..a0a84dda142143b49901a7549e6638a1331c0d62 100644
(file)
--- a/
tests/lib
+++ b/
tests/lib
@@
-245,7
+245,7
@@
t-git-get-ref () {
refs/*) ;;
*) fail "t-git-get-ref bad $ref" ;;
esac
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; }
'
$x = $1 if m#^(\w+) \Q'$1'\E(?:\^\{\})?$#;
END { print "$x\n" if length $x; }
'