Skip to content

Commit

Permalink
Merge pull request #16 from apiiro/talfin/ignore-head-missing
Browse files Browse the repository at this point in the history
Ignore missing HEAD error
  • Loading branch information
TalfinApiiro authored Nov 26, 2023
2 parents a6c529a + 7d48adc commit d7c793a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
8 changes: 1 addition & 7 deletions git/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,7 @@ func Snapshot(opts *options.Options) (err error) {
}
}

_, err = provider.getCommit("HEAD")
if err != nil {
return &util.ErrorWithCode{
StatusCode: util.ERROR_HEAD_REF_NOT_FOUND,
InternalError: fmt.Errorf("failed to resolve HEAD revision: %v", err),
}
}
_, _ = provider.getCommit("HEAD")

var commit *object.Commit
commit, err = provider.getCommit(opts.Revision)
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/urfave/cli/v2"
)

const VERSION = "1.12"
const VERSION = "1.13"

func main() {
cli.AppHelpTemplate =
Expand Down

0 comments on commit d7c793a

Please sign in to comment.