diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2015-06-07 12:17:22 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2015-06-07 13:45:48 +0100 |
commit | 84026aec1f98aaeb69a751c89a25c55b355c7ee8 (patch) | |
tree | 9a046554f8617593f6523db635589f2f690debd6 /tests/lib | |
parent | e0cf379ca6f4d10e6fa6a1af359859ea681dbb41 (diff) |
Test suite: t-git-get-ref: check that argument starts with ref/
Diffstat (limited to 'tests/lib')
-rw-r--r-- | tests/lib | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -241,6 +241,10 @@ t-clean-on-branch () { t-git-get-ref () { local ref=$1 + case "$ref" in + refs/*) ;; + *) fail "t-git-get-ref bad $ref" ;; + esac git show-ref -d $1 | perl -ne ' $x = $1 if m#^(\w+) \Q'$1'\E(?:\^\{\})?$#; END { print "$x\n" if length $x; } |