changeset 46225:88dfe1c279bb

tests: make test-subrepo-git.t compatible with git's master->main rename Git is about to change the default branch from "master" to "main". Recent versions has started warning about that, which makes tests fail. I assume the tests would fail in a different way once the default has changed. To make us compatible with that name change, let's set configure the default to be "master". That value makes the tests still work on older Git version (those where the default branch name is not configurable). Differential Revision: https://phab.mercurial-scm.org/D9746
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 12 Jan 2021 17:32:08 -0800
parents fcc324a228fe
children 0826d684a1b5
files tests/test-subrepo-git.t
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-subrepo-git.t	Tue Jan 12 14:45:32 2021 -0800
+++ b/tests/test-subrepo-git.t	Tue Jan 12 17:32:08 2021 -0800
@@ -17,6 +17,10 @@
   $ GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE"; export GIT_COMMITTER_DATE
   $ GIT_CONFIG_NOSYSTEM=1; export GIT_CONFIG_NOSYSTEM
 
+set default branch to value compatible with new and old git version
+
+  $ git config --global init.defaultBranch master
+
 root hg repo
 
   $ hg init t