Skip to content

Commit 4d53aad

Browse files
authored
Merge pull request #4093 from rgrinberg/revert-git
Fix git tests for old git
2 parents 31285ad + 622a26f commit 4d53aad

File tree

5 files changed

+10
-13
lines changed

5 files changed

+10
-13
lines changed

otherlibs/build-info/test/run.t

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Test embedding of build information
1111
> (package (name $i))
1212
> EOF
1313
> (cd $i;
14-
> git init --initial-branch master -q
14+
> git init -q;
1515
> git add .;
1616
> git commit -q -m _;
1717
> git tag -a 1.0+$i -m _)

test/blackbox-tests/test-cases/dune-project-meta/main.t/run.t

+2-2
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ generated META and opam files.
182182
> EOF
183183

184184
$ (cd version
185-
> git init --initial-branch master -q
185+
> git init -q
186186
> git add .
187187
> git commit -qm _
188188
> git tag -a 1.0 -m 1.0
@@ -217,7 +217,7 @@ generated META and opam files.
217217
> EOF
218218

219219
$ (cd version
220-
> git init --initial-branch master -q
220+
> git init -q
221221
> git add .
222222
> git commit -qm _
223223
> git tag -a 1.0 -m 1.0

test/blackbox-tests/test-cases/meta-template-version-bug.t

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
This test demonstrates a bug when there's a package with a meta template and a
22
custom version:
33

4-
$ git init --initial-branch master -q
4+
$ git init -q
55
$ git add .
66
$ git commit -qm _
77
$ git tag -a 1.0 -m 1.0

test/blackbox-tests/test-cases/subst.t/run.t

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Project with opam files
1414

1515
$ echo 'authors: [ "John Doe <john@doe.com>" ]' > foo.opam
1616

17-
$ git init --initial-branch master -q
17+
$ git init --quiet
1818
$ git add .
1919
$ git commit -am _ --quiet
2020
$ git tag -a 1.0 -m 1.0
@@ -51,7 +51,7 @@ And without an opam file preset.
5151
> let version = "${X}VERSION${X}"
5252
> EOF
5353

54-
$ git init --initial-branch master -q
54+
$ git init --quiet
5555
$ git add .
5656
$ git commit -am _ --quiet
5757
$ git tag -a 1.0 -m 1.0
@@ -88,7 +88,7 @@ Test subst and files with unicode (#3879)
8888
> let version = "${X}VERSION${X}"
8989
> EOF
9090

91-
$ git init --initial-branch master -q
91+
$ git init --quiet
9292
$ git add .
9393
$ git commit -am _ --quiet
9494
$ git tag -a 1.0 -m 1.0

test/expect-tests/vcs_tests.ml

+3-6
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,7 @@ type action =
5757

5858
let run_action (vcs : Vcs.t) action =
5959
match action with
60-
| Init -> (
61-
match vcs.kind with
62-
| Hg -> run vcs [ "init" ]
63-
| Git -> run vcs [ "init"; "--initial-branch"; "master" ] )
60+
| Init -> run vcs [ "init"; "-q" ]
6461
| Add fn -> run vcs [ "add"; fn ]
6562
| Commit -> (
6663
match vcs.kind with
@@ -150,7 +147,7 @@ let%expect_test _ =
150147
run Git script;
151148
[%expect
152149
{|
153-
$ git init --initial-branch master
150+
$ git init -q
154151
$ echo "-" > a
155152
$ git add a
156153
$ git commit -m 'commit message'
@@ -193,7 +190,7 @@ let%expect_test _ =
193190
run Hg script;
194191
[%expect
195192
{|
196-
$ hg init
193+
$ hg init -q
197194
$ echo "-" > a
198195
$ hg add a
199196
$ hg commit -m 'commit message' -u toto

0 commit comments

Comments
 (0)