Skip to content

Commit 95f9e14

Browse files
authored
[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 4c85557)
1 parent ae1f012 commit 95f9e14

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

configure

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5791,9 +5791,9 @@ HAS_GIT=no-repository
57915791
fi
57925792
if test $HAS_GIT = found
57935793
then
5794-
GITVERSION="git -C \$(srcdir) rev-parse --short HEAD"
5795-
GITTAG="git -C \$(srcdir) describe --all --always --dirty"
5796-
GITBRANCH="git -C \$(srcdir) name-rev --name-only HEAD"
5794+
GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
5795+
GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
5796+
GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
57975797
else
57985798
GITVERSION=""
57995799
GITTAG=""

configure.ac

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1005,9 +1005,9 @@ HAS_GIT=no-repository
10051005
fi
10061006
if test $HAS_GIT = found
10071007
then
1008-
GITVERSION="git -C \$(srcdir) rev-parse --short HEAD"
1009-
GITTAG="git -C \$(srcdir) describe --all --always --dirty"
1010-
GITBRANCH="git -C \$(srcdir) name-rev --name-only HEAD"
1008+
GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
1009+
GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
1010+
GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
10111011
else
10121012
GITVERSION=""
10131013
GITTAG=""

0 commit comments

Comments
 (0)