From 6ea5b2ff88ac53e4cfea8b0516e936e43e1d9cc1 Mon Sep 17 00:00:00 2001
From: Alexandre Aubin <alex.aubin@mailoo.org>
Date: Thu, 21 Jan 2021 22:05:19 +0100
Subject: [PATCH] Improve branch display, show corresponding commit

---
 lib/common.sh | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/lib/common.sh b/lib/common.sh
index cc0fcaa..16cdb68 100644
--- a/lib/common.sh
+++ b/lib/common.sh
@@ -232,8 +232,7 @@ function fetch_package_to_test() {
         path_to_package_to_test="${path_to_package_to_test%%/tree/*}"
     fi
 
-    log_info "Testing the package $path_to_package_to_test"
-    [ -n "$gitbranch" ] && log_info " on the branch ${gitbranch##-b }"
+    log_info "Testing package $path_to_package_to_test"
 
     package_path="$TEST_CONTEXT/app_folder"
 
@@ -255,9 +254,14 @@ function fetch_package_to_test() {
                 fi
             fi
         fi
+
+        log_info " on branch ${gitbranch##-b }"
+
         # Clone the repository
         git clone --quiet $path_to_package_to_test $gitbranch "$package_path"
 
+        log_info " (commit $(git -C $package_path rev-parse HEAD))"
+
         # If it's a local directory
     else
         # Do a copy in the directory of Package check