diff options
author | Ben Brown <ben.brown@codethink.co.uk> | 2017-10-13 14:40:55 +0000 |
---|---|---|
committer | Ben Brown <ben.brown@codethink.co.uk> | 2017-10-13 15:02:58 +0000 |
commit | c8e389918aa29e0987ec02b7744300b2bb86c095 (patch) | |
tree | 525e3ddaae42f7d6542af96ad541e11ccdcae5bd | |
parent | edf200386687460864c78d75d5e37ac102b17e87 (diff) | |
download | ybd-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.py | 4 |
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 |