]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Pass CI commit check if branches are 'even'
authorTim Rühsen <tim.ruehsen@gmx.de>
Tue, 9 Apr 2019 10:19:00 +0000 (12:19 +0200)
committerTim Rühsen <tim.ruehsen@gmx.de>
Tue, 9 Apr 2019 10:19:19 +0000 (12:19 +0200)
Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
devel/check_if_signed

index e7e5c504b2cd92dbe023439e7ed32f3417ff035c..61466a05b3d2ed22b74f33264a958ec74baa51ef 100755 (executable)
@@ -17,8 +17,11 @@ echo "source=$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME"
 # create list of commits of the current branch
 commits=$(git rev-list --no-merges $CI_MERGE_REQUEST_TARGET_BRANCH_NAME..)
 if [ -z "$commits" ]; then
-    echo "Couldn't find any commits to check"
-    exit 1
+  # OK if both branches are 'even'
+  git diff --quiet $CI_MERGE_REQUEST_TARGET_BRANCH_NAME.. && exit 0
+
+  echo "Couldn't find any commits to check"
+  exit 1
 fi
 
 # check if author's email matches email in 'Signed-off-by'