Re: [PATCH v5 4/4] init: provide useful advice about init.defaultBranch

2 messages, 2 authors, 2021-02-03 · open the first message on its own page

Re: [PATCH v5 4/4] init: provide useful advice about init.defaultBranch

From: Junio C Hamano <hidden>
Date: 2021-02-02 22:28:25

SZEDER Gábor [off-list ref] writes:
quoted
-		"${GIT_TEST_INSTALLED:-$GIT_EXEC_PATH}/git$X" init \
+		"${GIT_TEST_INSTALLED:-$GIT_EXEC_PATH}/git$X" -c \
+			init.defaultBranch="${GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME-master}" \
+			init \
 			"--template=$GIT_BUILD_DIR/templates/blt/" >&3 2>&4 ||
This breaks GIT_TEST_INSTALLED when the given Git version doesn't yet
contain 8b1fa77867 (Allow passing of configuration parameters in the
command line, 2010-03-26):
Yes, but test-installed is about running an old version of Git on
the current Git test suite.  In the tests we make liberal use of
"git -c <var>=<val>", which such an old version of Git has no chance
of passing.  So...

Re: [PATCH v5 4/4] init: provide useful advice about init.defaultBranch

From: SZEDER Gábor <hidden>
Date: 2021-02-03 05:22:17

On Tue, Feb 02, 2021 at 02:25:01PM -0800, Junio C Hamano wrote:
SZEDER Gábor [off-list ref] writes:
quoted
quoted
-		"${GIT_TEST_INSTALLED:-$GIT_EXEC_PATH}/git$X" init \
+		"${GIT_TEST_INSTALLED:-$GIT_EXEC_PATH}/git$X" -c \
+			init.defaultBranch="${GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME-master}" \
+			init \
 			"--template=$GIT_BUILD_DIR/templates/blt/" >&3 2>&4 ||
This breaks GIT_TEST_INSTALLED when the given Git version doesn't yet
contain 8b1fa77867 (Allow passing of configuration parameters in the
command line, 2010-03-26):
Yes, but test-installed is about running an old version of Git on
the current Git test suite.  In the tests we make liberal use of
"git -c <var>=<val>", which such an old version of Git has no chance
of passing.  So...
I've never run the whole test suite with GIT_TEST_INSTALLED for the
exact reason you mentioned.  However, I do regularly use it with
custom tests using only commands and options that already existed as
early as v1.6.0 (my go-to "old" version) to check when some
interesting or puzzling behavior appeared, and did just that yesterday
as well.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help