aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAnders Roxell <anders.roxell@linaro.org>2015-11-10 22:32:10 +0100
committerMaxim Uvarov <maxim.uvarov@linaro.org>2015-11-13 16:24:23 +0300
commitdceb0c19e37028eb27e637b7af58b44850ed03c3 (patch)
tree157fda9df0c95979b2de3a134b4b9004f0184410 /scripts
parentea1e46194bb39a78b51fc29d45ae5b499a4d72dc (diff)
scripts/git_hash: fix bug where dirty was always set
Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/git_hash.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/git_hash.sh b/scripts/git_hash.sh
index e15094e50..fc0b05715 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