Skip to content

Git tests fail if git defaultBranch config setting is not set to 'master' #118

@djerius

Description

@djerius

In my .gitconfig, I have set

[init]
	defaultBranch = main

which causes tests assuming the default branch is called master to fail, e.g.:

    #   Failed test 'master -> master'
    #   at /home/dj/.cpanm/work/1663196190.2607250/Code-TidyAll-0.82/t/lib/TestFor/Code/TidyAll/Git.pm line 105.
    #   (in TestFor::Code::TidyAll::Git->test_git)
    #                   'remote: 1 file did not pass tidyall check        
    # remote: [checked] foo.txt        
    # remote: *** needs tidying        
    # To /tmp/Code-TidyAll-avES/shared
    #  ! [remote rejected] main -> main (pre-receive hook declined)
    # error: failed to push some refs to '/tmp/Code-TidyAll-avES/shared'
    # '
    #     doesn't match '(?^:master -> master)'
    # Looks like you failed 1 test of 4.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions