Skip to content

git-signoff hook fails on first commit #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
KAUTH opened this issue Dec 26, 2022 · 0 comments
Open

git-signoff hook fails on first commit #4

KAUTH opened this issue Dec 26, 2022 · 0 comments
Labels
bug Something isn't working
Milestone

Comments

@KAUTH
Copy link
Owner

KAUTH commented Dec 26, 2022

Traceback:

[INFO] Installing environment for https://github.com/KAUTH/pre-commit-git-checks.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
Git Signoff Check........................................................Failed
- hook id: git-signoff
- exit code: 1

Traceback (most recent call last):
  File "/home/user/.cache/pre-commit/repoz2idhxv_/py_env-python3/lib/python3.8/site-packages/pre_commit_git_checks/hooks/utils.py", line 30, in run_cmd
    p = subprocess.run(
  File "/usr/lib/python3.8/subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['git', 'log', '--format=%B', '-n', '1']' returned non-zero exit status 128.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/user/.cache/pre-commit/repoz2idhxv_/py_env-python3/bin/pgchecks", line 8, in <module>
    sys.exit(cli())
  File "/home/user/.cache/pre-commit/repoz2idhxv_/py_env-python3/lib/python3.8/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/home/user/.cache/pre-commit/repoz2idhxv_/py_env-python3/lib/python3.8/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/home/user/.cache/pre-commit/repoz2idhxv_/py_env-python3/lib/python3.8/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/user/.cache/pre-commit/repoz2idhxv_/py_env-python3/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/user/.cache/pre-commit/repoz2idhxv_/py_env-python3/lib/python3.8/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/home/user/.cache/pre-commit/repoz2idhxv_/py_env-python3/lib/python3.8/site-packages/pre_commit_git_checks/cli.py", line 23, in signoff
    check_git_signoff()
  File "/home/user/.cache/pre-commit/repoz2idhxv_/py_env-python3/lib/python3.8/site-packages/pre_commit_git_checks/hooks/check_git_signoff.py", line 173, in check_git_signoff
    git_commit_message = run_cmd("git log --format=%B -n 1")
  File "/home/user/.cache/pre-commit/repoz2idhxv_/py_env-python3/lib/python3.8/site-packages/pre_commit_git_checks/hooks/utils.py", line 37, in run_cmd
    raise CalledProcessError(e)
pre_commit_git_checks.hooks.utils.CalledProcessError: Command '['git', 'log', '--format=%B', '-n', '1']' returned non-zero exit status 128.
@KAUTH KAUTH added the bug Something isn't working label Dec 26, 2022
@KAUTH KAUTH added this to the v0.0.2 milestone Dec 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant