Signed-off-by: Tony Finch <dot@dotat.at>
Reviewed-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
# In this mode you can request colored hints using GIT_PS1_SHOWCOLORHINTS=true
__git_ps1 ()
{
+ # preserve exit status
local exit=$?
local pcmode=no
local detached=no
;;
0|1) printf_format="${1:-$printf_format}"
;;
- *) return
+ *) return $exit
;;
esac
#In PC mode PS1 always needs to be set
PS1="$ps1pc_start$ps1pc_end"
fi
- return
+ return $exit
fi
local short_sha
if [ $pcmode = yes ]; then
PS1="$ps1pc_start$ps1pc_end"
fi
- return
+ return $exit
fi
# is it a symbolic ref?
b="${head#ref: }"
printf -- "$printf_format" "$gitstring"
fi
- # preserve exit status
return $exit
}