Patchwork D9176: tests: set git config using `git config` for simplicity

login
register
mail settings
Submitter phabricator
Date Oct. 8, 2020, 8:19 p.m.
Message ID <differential-rev-PHID-DREV-upnlmyvqksdxl7542e27-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/47411/
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
  I also took the liberty to not set the same config value twice as we
  did before.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

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,11 +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
-  $ echo "autocrlf = false" >> $HOME/.gitconfig
+  $ git config -f $HOME/.gitconfig init.defaultBranch master
+  $ git config -f $HOME/.gitconfig core.autocrlf false
   $ echo "[extensions]" >> $HGRCPATH
   $ echo "convert=" >> $HGRCPATH
   $ cat >> $HGRCPATH <<EOF