Getting rid of "hint: Using 'master' as the name for the initial branch." when initializing a repository with pygit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I am running some tests of a project that uses pygit, and the test
creates a test repository .. using pygit.

I noticed that in some environments the default branch warning is
displayed and not others because the git version varies.

The warning is just noise in the test log so I would like to avoid it,
and I would like to find a solution that works for git that predates the
introduction of this warning and the option to silence it as well as
the future git versions in which the default is subject to change.

AFAICT there is no clean way to do it. I can set up the global option to
whatever but I don't want to do that just to run tests.

I could set the repo local option but before calling
pygit2.init_repository() there is no repository to configure, and after
it is too late because I expect the message to be printed by this call.

Also I cannot rely on pygit to have some latest bells and whistles
because like git it varies across environments and the whole point of
running the test in different environments is to verify that it works
with whatever tool versions are avaialble there.

Any ideas?

Thanks

Michal



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux