Skip to content

Issue when not using "master" for main branch #30

@cmonte905

Description

@cmonte905

Got an error when the master branch is called "main" and not "master":

panic: GetCurrentVersion failed: failed to get master branch at 'refs/heads/master, 'refs/remotes/origin/master': reference not found

goroutine 1 [running]:
github.com/syncromatics/gogitver/cmd/gogitver/cmd.runRoot(0xcf3140, 0xd282f0, 0x0, 0x0)
	/go/pkg/mod/github.com/syncromatics/gogitver@v1.2.0/cmd/gogitver/cmd/root.go:108 +0x177
github.com/spf13/cobra.(*Command).execute(0xcf3140, 0xc0001121f0, 0x0, 0x0, 0xcf3140, 0xc0001121f0)
	/go/pkg/mod/github.com/spf13/cobra@v1.2.1/command.go:860 +0x2c2
github.com/spf13/cobra.(*Command).ExecuteC(0xcf3140, 0xc000000180, 0x200000003, 0xc000000180)
	/go/pkg/mod/github.com/spf13/cobra@v1.2.1/command.go:974 +0x375
github.com/spf13/cobra.(*Command).Execute(...)
	/go/pkg/mod/github.com/spf13/cobra@v1.2.1/command.go:902
github.com/syncromatics/gogitver/cmd/gogitver/cmd.Execute()
	/go/pkg/mod/github.com/syncromatics/gogitver@v1.2.0/cmd/gogitver/cmd/root.go:46 +0x31
main.main()
	/go/pkg/mod/github.com/syncromatics/gogitver@v1.2.0/cmd/gogitver/main.go:6 +0x25

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