[2.7] bpo-30411: Use --git-dir instead of -C to make git work under version below 1.8.5. (GH-8744) (GH-8838)

(cherry picked from commit 4c8555773a)
This commit is contained in:
Xiang Zhang 2018-08-20 23:15:07 +08:00 committed by GitHub
parent ae1f012729
commit 95f9e14e33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

6
configure vendored
View File

@ -5791,9 +5791,9 @@ HAS_GIT=no-repository
fi
if test $HAS_GIT = found
then
GITVERSION="git -C \$(srcdir) rev-parse --short HEAD"
GITTAG="git -C \$(srcdir) describe --all --always --dirty"
GITBRANCH="git -C \$(srcdir) name-rev --name-only HEAD"
GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
else
GITVERSION=""
GITTAG=""

View File

@ -1005,9 +1005,9 @@ HAS_GIT=no-repository
fi
if test $HAS_GIT = found
then
GITVERSION="git -C \$(srcdir) rev-parse --short HEAD"
GITTAG="git -C \$(srcdir) describe --all --always --dirty"
GITBRANCH="git -C \$(srcdir) name-rev --name-only HEAD"
GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
else
GITVERSION=""
GITTAG=""