summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Brown <ben.brown@codethink.co.uk>2017-10-13 14:40:55 +0000
committerBen Brown <ben.brown@codethink.co.uk>2017-10-13 15:02:58 +0000
commitc8e389918aa29e0987ec02b7744300b2bb86c095 (patch)
tree525e3ddaae42f7d6542af96ad541e11ccdcae5bd
parentedf200386687460864c78d75d5e37ac102b17e87 (diff)
downloadybd-c8e389918aa29e0987ec02b7744300b2bb86c095.tar.gz
Use branch in place of for-each-ref
for-each-ref didn't get --contains until v2.7.0.
-rw-r--r--ybd/repos.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/ybd/repos.py b/ybd/repos.py
index 75685fb..1b4da71 100644
--- a/ybd/repos.py
+++ b/ybd/repos.py
@@ -115,8 +115,8 @@ def ensure_ref_contains_sha(dn, gitdir, ref, sha):
def sha_in_ref():
try:
- return bool(check_output(['git', 'for-each-ref', '--contains',
- sha, 'refs/*/' + ref], stderr=fnull,
+ return bool(check_output(['git', 'branch', '--contains',
+ sha, ref], stderr=fnull,
universal_newlines=True).strip())
except:
return False