Skip to content

git defaults to master - please include main in the default #2761

@snohio

Description

@snohio

Description

As a developer, I would like it when using the cookbook source git in cookbook 'chef-ingredient', git: 'https://github.com/chef-cookbooks/chef-ingredient.git', tag: 'v0.12.0' for example to check both the main and master branches (or switch to main) since that is now the git standard so that all of my new repos work as a source with my new repos

Chef Workstation Version

2022.4.861

Platform Version

Windows 10

Error:

Installing diiv >= 0.0.0 from git
Error: Failed to generate Policyfile.lock
Reason: (CookbookOmnifetch::GitCommandError) Git error: command `git rev-parse master` failed. If this error persists, try removing the cache directory at 'C:/Users/butler/AppData/Local/chef-workstation/cache/.cache/git/5ae8ed5064434cdaea0d4bda86b053bd9880fe35'.Output from the command:

fatal: ambiguous argument 'master': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: Good First IssueAn issue ready for a new contributor.Triage: ConfirmedIndicates and issue has been confirmed as described.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions