From 9c04319155863a49a780e4787305720bad5da2a1 Mon Sep 17 00:00:00 2001
From: Jens Georg <jens.georg@desy.de>
Date: Tue, 4 Dec 2018 16:47:30 +0100
Subject: [PATCH] Fix building from master

---
 vars/helper.groovy | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vars/helper.groovy b/vars/helper.groovy
index b01c763..129cae9 100644
--- a/vars/helper.groovy
+++ b/vars/helper.groovy
@@ -64,7 +64,7 @@ def doPrepare(boolean checkoutScm, String gitUrl='') {
   // Check out source code
   if(checkoutScm) {
     if(gitUrl != '') {
-      if (env.BRANCH_NAME != '') {
+      if (env.BRANCH_NAME && env.BRANCH_NAME != '') {
           git branch: env.BRANCH_NAME, url: gitUrl
       } else {
           git gitUrl
-- 
GitLab