| 1 | diff --git a/scripts/setlocalversion b/scripts/setlocalversion |
| 2 | index 46989b8..887960f 100755 |
| 3 | --- a/scripts/setlocalversion |
| 4 | +++ b/scripts/setlocalversion |
| 5 | @@ -18,6 +18,7 @@ cd "${1:-.}" || usage |
| 6 | |
| 7 | # Check for git and a git repo. |
| 8 | if head=`git rev-parse --verify --short HEAD 2>/dev/null`; then |
| 9 | +if [ `git rev-parse --git-dir` = ".git" ]; then |
| 10 | |
| 11 | # If we are at a tagged commit (like "v2.6.30-rc6"), we ignore it, |
| 12 | # because this version is defined in the top level Makefile. |
| 13 | @@ -51,6 +52,7 @@ if head=`git rev-parse --verify --short HEAD 2>/dev/null`; then |
| 14 | # All done with git |
| 15 | exit |
| 16 | fi |
| 17 | +fi |
| 18 | |
| 19 | # Check for mercurial and a mercurial repo. |
| 20 | if hgid=`hg id 2>/dev/null`; then |
| 21 | |