D9470: tests: set old git default branch name for compatibility

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Mon Nov 30 18:05:32 UTC 2020


martinvonz created this revision.
Herald added a reviewer: durin42.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  Git's default branch name has changed on my machine (from "master" to
  "main"). Let's set the old name in our tests so we're compatible with
  both defaults (and maybe still compatible with Git versions that don't
  know about the config option).

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D9470

AFFECTED FILES
  tests/test-git-interop.t

CHANGE DETAILS

diff --git a/tests/test-git-interop.t b/tests/test-git-interop.t
--- a/tests/test-git-interop.t
+++ b/tests/test-git-interop.t
@@ -30,6 +30,7 @@
   [255]
   $ git init
   Initialized empty Git repository in $TESTTMP/nogit/.git/
+  $ git config --global init.defaultBranch master
 This status invocation shows some hg gunk because we didn't use
 `hg init --git`, which fixes up .git/info/exclude for us.
   $ hg status



To: martinvonz, durin42, #hg-reviewers
Cc: mercurial-patches, mercurial-devel


More information about the Mercurial-devel mailing list