Git hash was modified to handled non git builds but when building
out of tree, it detects a .git folder but do not change to this
folder to run git command.

Signed-off-by: Nicolas Morey-Chaisemartin <[email protected]>
---
 scripts/git_hash.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/git_hash.sh b/scripts/git_hash.sh
index 6cfec2f..e15094e 100755
--- a/scripts/git_hash.sh
+++ b/scripts/git_hash.sh
@@ -8,8 +8,8 @@ ROOTDIR=${1}
 
 CUSTOM_STR=${CUSTOM_STR:-https://git.linaro.org/lng/odp.git}
 if [ -d ${ROOTDIR}/.git ]; then
-       hash=$(git describe | tr -d "\n")
-       if git diff-index --name-only HEAD &>/dev/null ; 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
                dirty=-dirty
        fi
 
-- 
2.6.1.3.g8d02103

_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to