quiet git init command not to print out hint

Summary:
Git client was updated and it started outputting a hint that breaks our tests. It has no meaning in tests so just quiet it.

```
➜  fbcode git init
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint:   git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint:   git branch -m <name>
Initialized empty Git repository in /data/users/mzr/fbsource/fbcode/.git/
```

Reviewed By: StanislavGlebik

Differential Revision: D27232853

fbshipit-source-id: 683ebebb36049adb758e7c26f843f12159a45301
This commit is contained in:
Jan Mazur 2021-03-23 02:22:56 -07:00 committed by Facebook GitHub Bot
parent 617489bdc5
commit 1ca5f6bfae
23 changed files with 34 additions and 67 deletions

View File

@ -12,8 +12,7 @@
# Setup git repsitory
$ mkdir "$GIT_REPO"
$ cd "$GIT_REPO"
$ git init
Initialized empty Git repository in $TESTTMP/repo-git/.git/
$ git init -q
$ git commit --allow-empty -m "root commit"
[master (root-commit) d53a2ef] root commit
$ git branch root

View File

@ -617,8 +617,7 @@ test converting certain branches
$ mkdir git-testrevs
$ cd git-testrevs
$ git init
Initialized empty Git repository in $TESTTMP/git-testrevs/.git/
$ git init -q
$ echo a >> a ; git add a > /dev/null; git commit -m 'first' > /dev/null
$ echo a >> a ; git add a > /dev/null; git commit -m 'master commit' > /dev/null
$ git checkout -b goodbranch 'HEAD^'
@ -808,8 +807,7 @@ skip submodules in the conversion
.gitmodules-renamed
convert using a different remote prefix
$ git init git-repo7
Initialized empty Git repository in $TESTTMP/git-repo7/.git/
$ git init -q git-repo7
$ cd git-repo7
TODO: it'd be nice to use (?) lines instead of grep -v to handle the
git output variance, but that doesn't currently work in the middle of
@ -883,8 +881,7 @@ damage git repository by renaming a tree object
test for escaping the repo name (CVE-2016-3069)
$ git init '`echo pwned >COMMAND-INJECTION`'
Initialized empty Git repository in $TESTTMP/`echo pwned >COMMAND-INJECTION`/.git/
$ git init -q '`echo pwned >COMMAND-INJECTION`'
$ cd '`echo pwned >COMMAND-INJECTION`'
$ git commit -q --allow-empty -m 'empty'
$ cd ..
@ -900,8 +897,7 @@ test for escaping the repo name (CVE-2016-3069)
test for safely passing paths to git (CVE-2016-3105)
$ git init 'ext::sh -c echo% pwned% >GIT-EXT-COMMAND-INJECTION% #'
Initialized empty Git repository in $TESTTMP/ext::sh -c echo% pwned% >GIT-EXT-COMMAND-INJECTION% #/.git/
$ git init -q 'ext::sh -c echo% pwned% >GIT-EXT-COMMAND-INJECTION% #'
$ cd 'ext::sh -c echo% pwned% >GIT-EXT-COMMAND-INJECTION% #'
$ git commit -q --allow-empty -m 'empty'
$ cd ..
@ -919,7 +915,7 @@ test for safely passing paths to git (CVE-2016-3105)
Conversion of extra commit metadata to extras works
$ git init gitextras >/dev/null 2>/dev/null
$ git init -q gitextras >/dev/null 2>/dev/null
$ cd gitextras
$ touch foo
$ git add foo

View File

@ -35,8 +35,7 @@ Outside of a repo, should have no output
$ _scm_prompt
Set up repo
$ git init repo
Initialized empty Git repository in $TESTTMP/repo/.git/
$ git init -q repo
$ cd repo
$ _scm_prompt "%s\n"
master

View File

@ -1,8 +1,7 @@
Load commonly used test logic
$ . "$TESTDIR/hggit/testutil"
$ git init gitrepo
Initialized empty Git repository in $TESTTMP/gitrepo/.git/
$ git init -q gitrepo
$ cd gitrepo
$ echo alpha > alpha
$ git add alpha
@ -69,8 +68,7 @@ Make sure that a deleted .hgsubstate does not confuse hg-git
$ hg --cwd hgrepo-c status
clone empty repo
$ git init empty
Initialized empty Git repository in $TESTTMP/empty/.git/
$ git init -q empty
$ hg clone empty emptyhg
updating to branch default
0 files updated, 0 files merged, 0 files removed, 0 files unresolved

View File

@ -42,8 +42,7 @@ resolve using first parent
$ cd ..
$ git init --bare gitrepo
Initialized empty Git repository in $TESTTMP/gitrepo/
$ git init -q --bare gitrepo
$ cd hgrepo1
$ hg bookmark -r tip master

View File

@ -42,8 +42,7 @@ resolve using second parent
$ cd ..
$ git init --bare gitrepo
Initialized empty Git repository in $TESTTMP/gitrepo/
$ git init -q --bare gitrepo
$ cd hgrepo1
$ hg bookmark -r tip master

View File

@ -42,8 +42,7 @@ Load commonly used test logic
$ cd ..
$ git init --bare gitrepo
Initialized empty Git repository in $TESTTMP/gitrepo/
$ git init -q --bare gitrepo
$ cd hgrepo1
$ hg bookmark -r'desc(merge)' master

View File

@ -1,15 +1,13 @@
Load commonly used test logic
$ . "$TESTDIR/hggit/testutil"
$ git init gitrepo
Initialized empty Git repository in $TESTTMP/gitrepo/.git/
$ git init -q gitrepo
$ cd gitrepo
$ git commit --allow-empty -m empty
[master (root-commit) 6782568] empty
$ cd ..
$ git init --bare gitrepo2
Initialized empty Git repository in $TESTTMP/gitrepo2/
$ git init -q --bare gitrepo2
$ hg clone gitrepo hgrepo | grep -v '^updating'
importing git objects into hg

View File

@ -4,8 +4,7 @@
Load commonly used test logic
$ . "$TESTDIR/hggit/testutil"
$ git init gitrepo
Initialized empty Git repository in $TESTTMP/gitrepo/.git/
$ git init -q gitrepo
$ cd gitrepo
utf-8 encoded commit message
@ -24,8 +23,7 @@ The warning message changed in Git 1.8.0
variable i18n.commitencoding to the encoding your project uses.
$ cd ..
$ git init --bare gitrepo2
Initialized empty Git repository in $TESTTMP/gitrepo2/
$ git init -q --bare gitrepo2
$ hg clone gitrepo hgrepo | grep -v '^updating'
importing git objects into hg

View File

@ -5,8 +5,7 @@ Load commonly used test logic
# Set up the git repo
$ cd "$TESTTMP"
$ git init gitrepo
Initialized empty Git repository in $TESTTMP/gitrepo/.git/
$ git init -q gitrepo
$ cd gitrepo
$ echo commit1 > commit1
$ git add .

View File

@ -1,8 +1,7 @@
Load commonly used test logic
$ . "$TESTDIR/hggit/testutil"
$ git init gitrepo
Initialized empty Git repository in $TESTTMP/gitrepo/.git/
$ git init -q gitrepo
$ cd gitrepo
$ echo alpha > alpha
$ git add alpha
@ -95,8 +94,7 @@ final manifest in git is just beta
add alpha
$ cd ..
$ git init --bare gitrepo2
Initialized empty Git repository in $TESTTMP/gitrepo2/
$ git init -q --bare gitrepo2
$ hg clone gitrepo hgrepo | grep -v '^updating'
importing git objects into hg

View File

@ -1,8 +1,7 @@
Load commonly used test logic
$ . "$TESTDIR/hggit/testutil"
$ git init gitrepo
Initialized empty Git repository in $TESTTMP/gitrepo/.git/
$ git init -q gitrepo
$ cd gitrepo
$ echo alpha > alpha
$ git add alpha

View File

@ -1,8 +1,7 @@
Load commonly used test logic
$ . "$TESTDIR/hggit/testutil"
$ git init gitrepo
Initialized empty Git repository in $TESTTMP/gitrepo/.git/
$ git init -q gitrepo
$ cd gitrepo
$ echo alpha > alpha
$ git add alpha

View File

@ -2,8 +2,7 @@ Load commonly used test logic
$ . "$TESTDIR/hggit/testutil"
$ disable treemanifest
$ git init gitrepo
Initialized empty Git repository in $TESTTMP/gitrepo/.git/
$ git init -q gitrepo
$ cd gitrepo
$ echo alpha > alpha
$ git add alpha

View File

@ -1,8 +1,7 @@
Load commonly used test logic
$ . "$TESTDIR/hggit/testutil"
$ git init gitrepo
Initialized empty Git repository in $TESTTMP/gitrepo/.git/
$ git init -q gitrepo
$ cd gitrepo
$ echo alpha > alpha
$ git add alpha

View File

@ -1,8 +1,7 @@
Load commonly used test logic
$ . "$TESTDIR/hggit/testutil"
$ git init gitrepo
Initialized empty Git repository in $TESTTMP/gitrepo/.git/
$ git init -q gitrepo
$ cd gitrepo
$ echo alpha > alpha
$ git add alpha
@ -28,8 +27,7 @@ clean merge
create mode 100644 beta
$ cd ..
$ git init --bare gitrepo2
Initialized empty Git repository in $TESTTMP/gitrepo2/
$ git init -q --bare gitrepo2
$ hg clone gitrepo hgrepo | grep -v '^updating'
importing git objects into hg

View File

@ -1,8 +1,7 @@
Load commonly used test logic
$ . "$TESTDIR/hggit/testutil"
$ git init gitrepo
Initialized empty Git repository in $TESTTMP/gitrepo/.git/
$ git init -q gitrepo
$ cd gitrepo
$ echo alpha > alpha
$ git add alpha
@ -59,8 +58,7 @@ Load commonly used test logic
create mode 100644 zeta
$ cd ..
$ git init --bare gitrepo2
Initialized empty Git repository in $TESTTMP/gitrepo2/
$ git init -q --bare gitrepo2
$ hg clone gitrepo hgrepo | grep -v '^updating'
importing git objects into hg

View File

@ -1,8 +1,7 @@
Load commonly used test logic
$ . "$TESTDIR/hggit/testutil"
$ git init gitrepo
Initialized empty Git repository in $TESTTMP/gitrepo/.git/
$ git init -q gitrepo
$ cd gitrepo
$ echo alpha > alpha
$ git add alpha

View File

@ -1,8 +1,7 @@
Load commonly used test logic
$ . "$TESTDIR/hggit/testutil"
$ git init gitrepo
Initialized empty Git repository in $TESTTMP/gitrepo/.git/
$ git init -q gitrepo
$ cd gitrepo
$ echo alpha > alpha
$ git add alpha

View File

@ -1,8 +1,7 @@
Load commonly used test logic
$ . "$TESTDIR/hggit/testutil"
$ git init gitrepo
Initialized empty Git repository in $TESTTMP/gitrepo/.git/
$ git init -q gitrepo
$ cd gitrepo
$ echo alpha > alpha
$ git add alpha

View File

@ -1,8 +1,7 @@
Load commonly used test logic
$ . "$TESTDIR/hggit/testutil"
$ git init gitrepo
Initialized empty Git repository in $TESTTMP/gitrepo/.git/
$ git init -q gitrepo
$ cd gitrepo
$ mkdir d1
$ echo a > d1/f1
@ -21,8 +20,7 @@ Load commonly used test logic
$ cd ..
$ git init --bare gitrepo2
Initialized empty Git repository in $TESTTMP/gitrepo2/
$ git init -q --bare gitrepo2
$ hg clone gitrepo hgrepo | grep -v '^updating'
importing git objects into hg

View File

@ -3,8 +3,7 @@ inconsistencies. Since hg-git is ostensibly correct, we artificially create
inconsistencies by placing different Mercurial and Git repos in the right spots.
$ . "$TESTDIR/hggit/testutil"
$ git init gitrepo
Initialized empty Git repository in $TESTTMP/gitrepo/.git/
$ git init -q gitrepo
$ cd gitrepo
$ echo normalf > normalf
$ echo missingf > missingf

View File

@ -4,8 +4,7 @@
$ shorttraceback
$ enable lz4revlog
$ git init a-git
Initialized empty Git repository in $TESTTMP/a-git/.git/
$ git init -q a-git
$ cd a-git
Make "a" compressable