X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=scripts%2Fsetlocalversion;h=63d91e22ed7ccd18a0cd77852af647112ed216bb;hb=14864a52cd8189e8567df8351d9fc7e435133abd;hp=d105a44b68f664a55559e38217dcf27ccf025b70;hpb=ee3e542fec6e69bc9fb668698889a37d93950ddf;p=firefly-linux-kernel-4.4.55.git diff --git a/scripts/setlocalversion b/scripts/setlocalversion index d105a44b68f6..63d91e22ed7c 100755 --- a/scripts/setlocalversion +++ b/scripts/setlocalversion @@ -43,7 +43,8 @@ scm_version() fi # Check for git and a git repo. - if test -d .git && head=`git rev-parse --verify --short HEAD 2>/dev/null`; then + if test -z "$(git rev-parse --show-cdup 2>/dev/null)" && + head=`git rev-parse --verify --short HEAD 2>/dev/null`; then # If we are at a tagged commit (like "v2.6.30-rc6"), we ignore # it, because this version is defined in the top level Makefile.