diff --git a/sette/all_functions.sh b/sette/all_functions.sh
index f75cfe3d155ea1e14ec6dab19c0818366eb52e81..94822b6e63a28323c5878ab0d178087cc693c6a4 100755
--- a/sette/all_functions.sh
+++ b/sette/all_functions.sh
@@ -172,7 +172,7 @@ clean_config() {
 # define validation dir
 set_valid_dir () {
     if [ ${DETACHED_HEAD} == "no" ] ; then
-      REVISION_NB=`git -C ${MAIN_DIR} rev-list --abbrev-commit HEAD | head -1l`
+      REVISION_NB=`git -C ${MAIN_DIR} rev-parse --short HEAD`
     else
       REVISION_NB=${DETACHED_CMIT}
     fi
diff --git a/sette/sette_eval.sh b/sette/sette_eval.sh
index f46b47884cace822f3ee59055d9914d5c26812e2..58263277a5944373b113686d7fdbe76e043469a8 100755
--- a/sette/sette_eval.sh
+++ b/sette/sette_eval.sh
@@ -262,20 +262,18 @@ localchanges=`git status --short -uno | wc -l`
 git branch --show-current >& /dev/null
 if [[ $? == 0 ]] ; then
   branchname="$(git branch --show-current)"
+  revision=`git rev-parse --short HEAD`
   if [ -z $branchname ] ; then
    # Probabably on a detached HEAD (possibly testing an old commit).
    # Verify this and try to recover original commit
    MORE_INFO="$(git branch -a | head -1l | sed -e's/.*(//' -e 's/)//' )"
    if [[ "${MORE_INFO}" == *"detached"* ]] ; then
-     revision=$( echo \\${MORE_INFO} | awk '{print $NF}' )
      # There is no robust way to recover a branch name in a detached state
      # so just use the commit with a prefix
      branchname="detached_"${revision}
    else
      branchname="Unknown"
    fi
-  else
-   revision=`git rev-list --abbrev-commit origin | head -1l`
   fi
 else
   branchname="Unknown"
diff --git a/sette/sette_rpt.sh b/sette/sette_rpt.sh
index 862257cc88e1e705dbbb1f81ef943590b194357e..ff7ebf8d7c73db1b00a6ca7358c2c396d4585d3d 100755
--- a/sette/sette_rpt.sh
+++ b/sette/sette_rpt.sh
@@ -580,20 +580,18 @@ localchanges=`git status --short -uno | wc -l`
 git branch --show-current >& /dev/null
 if [[ $? == 0 ]] ; then
   branchname="$(git branch --show-current)"
+  revision=`git rev-parse --short HEAD`
   if [ -z $branchname ] ; then
    # Probabably on a detached HEAD (possibly testing an old commit).
    # Verify this and try to recover original commit
    MORE_INFO="$(git branch -a | head -1l | sed -e's/.*(//' -e 's/)//' )"
    if [[ "${MORE_INFO}" == *"detached"* ]] ; then
-     revision=$( echo \\${MORE_INFO} | awk '{print $NF}' )
      # There is no robust way to recover a branch name in a detached state
      # so just use the commit with a prefix
      branchname="detached_"${revision}
    else
      branchname="Unknown"
    fi
-  else
-   revision=`git rev-list --abbrev-commit HEAD | head -1l`
   fi
 else
   branchname="Unknown"