Skip to content

Commit efc3a66

Browse files
committed
Only support git 2.23 and above
When adding tests for all version I discovered that git before 2.23 caused subrepo issues due to how --is-ancestor worked. I tried to find a way to support both versions, but was not successful so I decided to drop support for the older versions.
1 parent 6d2dc05 commit efc3a66

File tree

5 files changed

+20
-9
lines changed

5 files changed

+20
-9
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ INSTALL_MAN1 ?= $(DESTDIR)$(PREFIX)/share/man/man1
2525
DOCKER_TAG ?= git-subrepo-testing:latest
2626
DOCKER_IMAGE := $(DOCKER_TAG)
2727
BASH_VERSIONS ?= 5.3 5.2 5.1 5.0 4.4 4.3 4.2 4.1 4.0 3.2
28-
GIT_VERSIONS := 2.51 2.48 2.40 2.30 2.29 2.25 2.17
28+
GIT_VERSIONS := 2.51 2.48 2.40 2.30 2.29 2.25 2.23
2929

3030
# Create matrix of all bash/git combinations for comprehensive testing
3131
BASH_GIT_COMBINATIONS := $(foreach bash,$(BASH_VERSIONS),$(foreach git,$(GIT_VERSIONS),$(bash)-$(git)))

Meta

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ author:
1717

1818
requires:
1919
bash: 4.0.0
20-
git: 2.7.0
20+
git: 2.23.0
2121
test:
2222
cmd: make test
2323
install: make install

ReadMe.pod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ The best short answer is:
114114

115115
The complete "Installation Instructions" can be found below.
116116

117-
Note: git-subrepo needs a git version (> 2.7) that supports worktree:s.
117+
Note: git-subrepo needs a git version >= 2.23) due to changes in --is-ansestor.
118118

119119
=head1 Commands
120120

lib/git-subrepo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ bash+:import :std can version-check
3232

3333
VERSION=0.4.9
3434
REQUIRED_BASH_VERSION=4.0
35-
REQUIRED_GIT_VERSION=2.7.0
35+
REQUIRED_GIT_VERSION=2.23.0
3636
GIT_TMP=$(git rev-parse --git-common-dir 2> /dev/null || echo .git)/tmp
3737

3838
# `git rev-parse` turns this into a getopt parser and a command usage message:

test/Dockerfile

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,17 +131,28 @@ RUN cd /root \
131131
&& rm -fr bash* \
132132
&& true
133133

134+
# Buil/install bash-5.3
135+
RUN cd /root \
136+
&& wget https://ftp.gnu.org/gnu/bash/bash-5.3.tar.gz \
137+
&& tar -xzf bash-5.3.tar.gz \
138+
&& cd bash-5.3 \
139+
&& ./configure --prefix=/bash-5.3 \
140+
&& make \
141+
&& make install \
142+
&& rm -fr bash* \
143+
&& true
144+
134145

135146
# Build/install git-2.17
136147
RUN cd /root \
137-
&& wget --timeout=60 --retry-connrefused --tries=3 https://github.com/git/git/archive/v2.17.6.tar.gz \
138-
&& tar -xzf v2.17.6.tar.gz \
139-
&& cd git-2.17.6 \
148+
&& wget --timeout=60 --retry-connrefused --tries=3 https://github.com/git/git/archive/v2.23.4.tar.gz \
149+
&& tar -xzf v2.23.4.tar.gz \
150+
&& cd git-2.23.4 \
140151
&& make configure \
141-
&& ./configure --prefix=/git-2.17 --with-openssl --with-libpcre --with-curl \
152+
&& ./configure --prefix=/git-2.23 --with-openssl --with-libpcre --with-curl \
142153
&& make all -j$(nproc) \
143154
&& make install \
144-
&& cd /root && rm -fr git* v2.17.6.tar.gz
155+
&& cd /root && rm -fr git* v2.23.4.tar.gz
145156

146157
# Build/install git-2.25
147158
RUN cd /root \

0 commit comments

Comments
 (0)