tests: set git config using `git config` for simplicity
authorMartin von Zweigbergk <martinvonz@google.com>
Thu, 08 Oct 2020 13:19:18 -0700
changeset 45684 0c18493287f5
parent 45683 04aa48afab99
child 45685 57b5452a55d5
tests: set git config using `git config` for simplicity I also took the liberty to not set the same config value twice as we did before. Differential Revision: https://phab.mercurial-scm.org/D9176
tests/test-convert-git.t
--- a/tests/test-convert-git.t	Thu Oct 08 13:10:16 2020 -0700
+++ b/tests/test-convert-git.t	Thu Oct 08 13:19:18 2020 -0700
@@ -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