lint: Disable signature output in git log #31479

pull hodlinator wants to merge 1 commits into bitcoin:master from hodlinator:2024/12/lint_git_log_sig_fix changing 1 files +2 −2
  1. hodlinator commented at 9:33 am on December 12, 2024: contributor

    Necessary for users that have signature output enabled by default, since the script would stumble on them and error out.


    Testing setup

    Set local repo config to show signatures in log by default, simulating a user having that setting turned on globally.

    0₿ git config set log.showSignature true
    

    Command under test

    0₿ ( cd ./test/lint/test_runner/ && COMMIT_RANGE='HEAD^..HEAD' cargo run )
    

    Before

     0...
     1fatal: invalid object name 'gpg'.
     2Traceback (most recent call last):
     3  File "/home/hodlinator/bitcoin/test/lint/lint-git-commit-check.py", line 52, in <module>
     4    main()
     5  File "/home/hodlinator/bitcoin/test/lint/lint-git-commit-check.py", line 42, in main
     6    commit_info = check_output(["git", "log", "--format=%B", "-n", "1", hash], text=True, encoding="utf8").splitlines()
     7                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     8  File "/nix/store/wfbjq35kxs6x83c3ncpfxdyl5gbhdx4h-python3-3.12.6/lib/python3.12/subprocess.py", line 466, in check_output
     9    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
    10           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    11  File "/nix/store/wfbjq35kxs6x83c3ncpfxdyl5gbhdx4h-python3-3.12.6/lib/python3.12/subprocess.py", line 571, in run
    12    raise CalledProcessError(retcode, process.args,
    13subprocess.CalledProcessError: Command '['git', 'log', '--format=%B', '-n', '1', 'gpg: Signature made ons 11 dec 2024 10:46:34 CET']' returned non-zero exit status 128.
    14^---- ⚠️ Failure generated from lint-git-commit-check.py
    15...
    

    After

    (No failure generated by lint-git-commit-check.py).

  2. lint: Disable signature output in git log
    Necessary for users that have signature output enabled by default, since the script would stumble on them and error out.
    e2d3372e55
  3. DrahtBot commented at 9:34 am on December 12, 2024: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/31479.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK maflcko, willcl-ark

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

  4. DrahtBot added the label Tests on Dec 12, 2024
  5. maflcko commented at 10:05 am on December 12, 2024: member
    lgtm ACK e2d3372e558d227aa6dd604b67724685d62e547e
  6. willcl-ark approved
  7. willcl-ark commented at 11:06 am on December 12, 2024: member
    ACK e2d3372e558d227aa6dd604b67724685d62e547e
  8. fanquake merged this on Dec 12, 2024
  9. fanquake closed this on Dec 12, 2024

  10. hodlinator deleted the branch on Dec 12, 2024

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-21 12:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me