[autobuilder-helper,thud,05/40] scripts/send-qa-email: Handle older git clients

Submitted by Richard Purdie on Sept. 10, 2020, 1:30 p.m. | Patch ID: 176327

Details

Message ID 20200910133035.2044355-5-richard.purdie@linuxfoundation.org
State New
Headers show

Commit Message

Richard Purdie Sept. 10, 2020, 1:30 p.m.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 scripts/send-qa-email | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/scripts/send-qa-email b/scripts/send-qa-email
index 38c951b..d2f4574 100755
--- a/scripts/send-qa-email
+++ b/scripts/send-qa-email
@@ -70,7 +70,10 @@  if 'poky' in repos and os.path.exists(resulttool) and args.results_dir:
                 subprocess.check_call(["git", "rev-parse", "--verify", basebranch], cwd=tempdir)
             except subprocess.CalledProcessError:
                 # Doesn't exist so base it off master
-                subprocess.check_call(["git", "branch", "master", basebranch], cwd=tempdir)
+                # some older hosts don't have git branch old new
+                subprocess.check_call(["git", "checkout", "master"], cwd=tempdir)
+                subprocess.check_call(["git", "branch", basebranch], cwd=tempdir)
+                subprocess.check_call(["git", "checkout", basebranch], cwd=tempdir)
                 extraopts = None
 
         subprocess.check_call([resulttool, "store", args.results_dir, tempdir])