Patchwork D9174: tests: make test-convert-git.t work across changed default branch name

login
register
mail settings
Submitter phabricator
Date Oct. 8, 2020, 8:19 p.m.
Message ID <differential-rev-PHID-DREV-5igmq7ybx5hr3pgmzgyq-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/47409/
State Superseded
Headers show

Comments

phabricator - Oct. 8, 2020, 8:19 p.m.
martinvonz created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  Recent git versions default to "main" instead of "master", which
  breaks our test.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  tests/test-convert-git.t

CHANGE DETAILS




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

Patch

diff --git a/tests/test-convert-git.t b/tests/test-convert-git.t
--- a/tests/test-convert-git.t
+++ b/tests/test-convert-git.t
@@ -1,5 +1,7 @@ 
 #require git
 
+  $ echo "[init]" >> $HOME/.gitconfig
+  $ echo "defaultBranch = master" >> $HOME/.gitconfig
   $ echo "[core]" >> $HOME/.gitconfig
   $ echo "autocrlf = false" >> $HOME/.gitconfig
   $ echo "[core]" >> $HOME/.gitconfig