From c8e389918aa29e0987ec02b7744300b2bb86c095 Mon Sep 17 00:00:00 2001 From: Ben Brown Date: Fri, 13 Oct 2017 14:40:55 +0000 Subject: Use branch in place of for-each-ref for-each-ref didn't get --contains until v2.7.0. --- ybd/repos.py | 4 ++-- 1 file 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 -- cgit v1.2.1