Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: go-git/go-git
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v5.18.0
Choose a base ref
...
head repository: go-git/go-git
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v5.19.0
Choose a head ref
  • 20 commits
  • 20 files changed
  • 2 contributors

Commits on Apr 18, 2026

  1. Configuration menu
    Copy the full SHA
    0ea8638 View commit details
    Browse the repository at this point in the history

Commits on Apr 20, 2026

  1. Merge pull request #2010 from go-git/renovate/releases/v5.x-go-github…

    ….com-go-git-go-git-v5-vulnerability
    
    build: Update module github.com/go-git/go-git/v5 to v5.18.0 [SECURITY] (releases/v5.x)
    pjbgf authored Apr 20, 2026
    Configuration menu
    Copy the full SHA
    e5bbc08 View commit details
    Browse the repository at this point in the history

Commits on May 6, 2026

  1. build: Remove Go 1.24 from workflows

    Signed-off-by: Paulo Gomes <[email protected]>
    pjbgf committed May 6, 2026
    Configuration menu
    Copy the full SHA
    78911f0 View commit details
    Browse the repository at this point in the history
  2. build: Bump pjbgf/sha1cd

    Signed-off-by: Paulo Gomes <[email protected]>
    pjbgf committed May 6, 2026
    Configuration menu
    Copy the full SHA
    7a8c172 View commit details
    Browse the repository at this point in the history
  3. build: Bump go-billy

    Signed-off-by: Paulo Gomes <[email protected]>
    pjbgf committed May 6, 2026
    Configuration menu
    Copy the full SHA
    d245deb View commit details
    Browse the repository at this point in the history
  4. Merge pull request #2060 from go-git/v5-test

    v5: Bump sha1cd and go-billy
    pjbgf authored May 6, 2026
    Configuration menu
    Copy the full SHA
    7c5a450 View commit details
    Browse the repository at this point in the history
  5. plumbing: object, Add support for gpgsig-sha256 header

    Signed-off-by: Paulo Gomes <[email protected]>
    pjbgf committed May 6, 2026
    Configuration menu
    Copy the full SHA
    fbcea34 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    500681f View commit details
    Browse the repository at this point in the history
  7. plumbing: objects, Ignore standard headers in ExtraHeaders

    Signed-off-by: Paulo Gomes <[email protected]>
    pjbgf committed May 6, 2026
    Configuration menu
    Copy the full SHA
    a3af236 View commit details
    Browse the repository at this point in the history
  8. plumbing: object, Decode commit headers via a state machine

    Replace the per-iteration flag soup in (*Commit).Decode with a
    func-based stateFn loop that mirrors upstream Git's parsing posture.
    The new state machine encodes "where we are in the buffer" as the
    function being called rather than as a bag of mutable booleans.
    
    Conformance changes vs upstream commit.c:
    - tree must be the first header, missing tree errors with
      ErrMalformedCommit (matches the "bogus commit object" check at
      commit.c:508-510).
    - Parents are accepted only contiguously after tree; out-of-position
      parent lines are silently dropped (matches parse_commit_buffer's
      parent loop exiting at the first non-parent line and
      read_commit_extra_header_lines filtering parents from extras).
    - Author and committer are accepted only at their canonical positions
      (immediately after parents, immediately after author). Out-of-place
      occurrences are dropped, mirroring parse_commit_date silently
      returning 0 plus the standard_header_field filter.
    - Encoding/mergetag/gpgsig/gpgsig-sha256 follow first-wins; duplicate
      sig/mergetag continuation lines are discarded by a dedicated
      scanSkipCont state.
    - Continuation strip uses line[1:] (single space) instead of
      bytes.TrimLeft, mirroring upstream's `line + 1` at commit.c:1509.
    - Header/body boundary is the literal "\n" only, matching
      *line == '\n' at commit.c:1502.
    
    Tests:
    - TestDecodeRequiresTreeFirst covers the four hard-error inputs
      (missing tree, parent before tree, extra before tree, empty buffer).
    - TestDecodeFirstOccurrenceWins covers the lenient drop semantics for
      duplicate tree/author/committer/gpgsig/gpgsig-sha256, parents after
      author or interleaved with extras, missing committer, encoding
      between author and committer (drops the misplaced committer), and
      author at a non-canonical position (drops author and committer).
    - TestMalformedHeader is back to expecting NoError (lenient parsing of
      garbage author/committer values).
    
    The state machine lives in plumbing/object/commit_scanner.go.
    
    Assisted-by: Claude Opus 4.7 <[email protected]>
    Signed-off-by: Paulo Gomes <[email protected]>
    pjbgf committed May 6, 2026
    Configuration menu
    Copy the full SHA
    b808faf View commit details
    Browse the repository at this point in the history
  9. plumbing: object, Add support for Tag.SignatureSHA256

    Signed-off-by: Paulo Gomes <[email protected]>
    pjbgf committed May 6, 2026
    Configuration menu
    Copy the full SHA
    98e337d View commit details
    Browse the repository at this point in the history
  10. plumbing: object, Align Tag.EncodeWithoutSignature with Commit

    Tag verification re-encoded from struct fields, so any non-canonical
    bytes the signature was computed over (duplicate headers, mutation-only
    fields like Signature/SignatureSHA256, etc.) were lost from the payload
    and signatures that were valid in upstream Git failed in go-git.
    
    Mirror the approach already used by Commit: retain a reference to the
    source plumbing.EncodedObject on Decode, add matchesSource() so
    EncodeWithoutSignature can stream the raw bytes (with the inline
    trailing PGP block truncated and gpgsig/gpgsig-sha256 headers stripped)
    when the struct still matches the source. Mutating struct fields still
    falls back to the struct-encoded payload.
    
    Assisted-by: Claude Opus 4.7 <[email protected]>
    Signed-off-by: Paulo Gomes <[email protected]>
    pjbgf committed May 6, 2026
    Configuration menu
    Copy the full SHA
    fe8ed62 View commit details
    Browse the repository at this point in the history
  11. plumbing: object, Reject multi-signature commits at Verify

    Align Commit.Verify with upstream's parse_buffer_signed_by_header
    (commit.c:1186) and parse_gpg_output rejection (gpg-interface.c:257-269).
    
    The commit scanner now concatenates every gpgsig/gpgsig-sha256 header
    into a single signature buffer instead of first-wins, and Commit.Verify
    returns the new ErrMultipleSignatures when that buffer carries more
    than one armored block.
    
    Assisted-by: Claude Opus 4.7 <[email protected]>
    Signed-off-by: Paulo Gomes <[email protected]>
    pjbgf committed May 6, 2026
    Configuration menu
    Copy the full SHA
    5b0cd38 View commit details
    Browse the repository at this point in the history
  12. plumbing: object, Decode Tag headers via a state machine

    Signed-off-by: Paulo Gomes <[email protected]>
    pjbgf committed May 6, 2026
    Configuration menu
    Copy the full SHA
    f415670 View commit details
    Browse the repository at this point in the history
  13. plumbing: object, Add ErrMalformedTag

    Signed-off-by: Paulo Gomes <[email protected]>
    pjbgf committed May 6, 2026
    Configuration menu
    Copy the full SHA
    a387aa8 View commit details
    Browse the repository at this point in the history
  14. tests: Add git conformance tests for signing verification

    Signed-off-by: Paulo Gomes <[email protected]>
    pjbgf committed May 6, 2026
    Configuration menu
    Copy the full SHA
    1971422 View commit details
    Browse the repository at this point in the history
  15. tests: Skip double checks in Git v2.11

    Signed-off-by: Paulo Gomes <[email protected]>
    pjbgf committed May 6, 2026
    Configuration menu
    Copy the full SHA
    e134ba3 View commit details
    Browse the repository at this point in the history
  16. plumbing: object, Align Tree handling with upstream

    Signed-off-by: Paulo Gomes <[email protected]>
    pjbgf committed May 6, 2026
    Configuration menu
    Copy the full SHA
    6e1d348 View commit details
    Browse the repository at this point in the history
  17. plumbing: object, Reset object before decode

    Signed-off-by: Paulo Gomes <[email protected]>
    pjbgf committed May 6, 2026
    Configuration menu
    Copy the full SHA
    d315264 View commit details
    Browse the repository at this point in the history
  18. Merge pull request #2065 from go-git/commit-v5

    v5: Align object encoding with upstream
    pjbgf authored May 6, 2026
    Configuration menu
    Copy the full SHA
    bc930f4 View commit details
    Browse the repository at this point in the history
Loading