Skip to content
Snippets Groups Projects
Commit e55b967a authored by Damien Lespiau's avatar Damien Lespiau Committed by Simona Vetter
Browse files

qf: Fix shell parameter expansion for the author name and email

A ':' was missing (should have been ':+'), but I think we want ':-', not
':+' ie we want to substitute if the parameter is undefined or empty:

  http://www.gnu.org/software/bash/manual/bash.html#Shell-Parameter-Expansion



Signed-off-by: default avatarDamien Lespiau <damien.lespiau@intel.com>
parent ff432e4c
No related branches found
No related tags found
No related merge requests found
......@@ -295,11 +295,11 @@ case "$1" in
quilt_clean_check
username=$GIT_COMMMITTER_NAME
username=${username+`git config user.name || true`}
username=${username+`getent passwd $USER | cut -d: -f 5 | cut -d, -f 1 || true`}
username=${username:-`git config user.name || true`}
username=${username:-`getent passwd $USER | cut -d: -f 5 | cut -d, -f 1 || true`}
useremail=$GIT_COMMMITTER_EMAIL
useremail=${useremail+`git config user.email || true`}
useremail=${useremail+$EMAIL}
useremail=${useremail:-`git config user.email || true`}
useremail=${useremail:-$EMAIL}
if [[ -z $useremail || -z $username ]] ; then
echo User name/email not found, please fix your config
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment