Message ID | 1447191136-21213-4-git-send-email-anders.roxell@linaro.org |
---|---|
State | New |
Headers | show |
diff --git a/scripts/git_hash.sh b/scripts/git_hash.sh index e15094e..fc0b057 100755 --- a/scripts/git_hash.sh +++ b/scripts/git_hash.sh @@ -9,7 +9,8 @@ ROOTDIR=${1} CUSTOM_STR=${CUSTOM_STR:-https://git.linaro.org/lng/odp.git} if [ -d ${ROOTDIR}/.git ]; then hash=$(git --git-dir=${ROOTDIR}/.git describe | tr -d "\n") - if git --git-dir=${ROOTDIR}/.git diff-index --name-only HEAD &>/dev/null ; then + if [[ $(git --git-dir=${ROOTDIR}/.git diff --shortstat 2> /dev/null \ + | tail -n1) != "" ]]; then dirty=-dirty fi
Signed-off-by: Anders Roxell <anders.roxell@linaro.org> --- scripts/git_hash.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)