Commit 95f9e14e authored by Xiang Zhang's avatar Xiang Zhang Committed by GitHub

[2.7] bpo-30411: Use --git-dir instead of -C to make git work under version...

[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 4c855577)
parent ae1f0127
......@@ -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=""
......
......@@ -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=""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment