Skip to content

[BUG] First commit #242

@jplu

Description

@jplu

describe your issue

Fails during the first commit of a just initiated repo when other hooks than check-message are activated as it seems to rely on the git log command that raises an error because the logs are empty.

For example, when the hook check-commit-signoff is activated:

Commit rejected.                                                  
                                                                  
Type commit_signoff check failed => fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
 
It doesn't match regex: Signed-off-by:.*[A-Za-z0-9]\s+<.+@.+>
Signed-off-by not found in latest commit
Suggest: run command `git commit -m "conventional commit message" --signoff`

commit-check version

0.9.7

.commit-check.yml

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions