Sitelet https://github.com/gitpython-developers/GitPython/compare/3.1.59...main
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: gitpython-developers/GitPython
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3.1.59
Choose a base ref
...
head repository: gitpython-developers/GitPython
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
  • 11 commits
  • 11 files changed
  • 2 contributors

Commits on Aug 10, 2026

  1. Merge pull request #2212 from gitpython-developers/next-release

    prepare changelog prior to release
    Byron authored Aug 10, 2026
    Configuration menu
    Copy the full SHA
    52a6cba View commit details
    Browse the repository at this point in the history

Commits on Aug 11, 2026

  1. Preserve Git config value semantics

    <!-- agent -->
    Decode Git-supported quoted value escapes directly instead of routing UTF-8 text
    through Python unicode_escape. This preserves newlines, quotes, backslashes, and
    non-ASCII text when an unrelated config update rewrites existing values.
    
    Quote values containing Git comment delimiters (# and ;) or leading/trailing
    whitespace so Git does not truncate or trim their data. Escape LF, tab,
    backspace, quote, and backslash, while rejecting carriage returns and NULs
    before opening the destination.
    
    Regression coverage round-trips these values through both GitPython and git
    config and verifies unsafe control characters cannot alter the original file.
    Behavior follows Git config.c parse_value() and write_pair().
    
    Assisted-by: GPT 5.6
    Co-authored-by: GPT 5.6 <codex@openai.com>
    Byron and codex committed Aug 11, 2026
    Configuration menu
    Copy the full SHA
    eefa7e4 View commit details
    Browse the repository at this point in the history
  2. fix: decode quoted diff paths in one pass

    <!-- agent -->
    GHSA-v6xg-m7rh-r365 (closed) reports that quoted patch paths can crash or
    silently change when an escaped literal backslash precedes digits.
    
    Add regression coverage distinguishing literal backslashes from real
    octal byte escapes, then decode Git's C-style quoting sequentially so
    one escape cannot be reinterpreted by a later pass. Match Git baseline
    cf5497b14c5a24f10c13f7e0ee85cb95af13ea6a quote.c::unquote_c_style by
    accepting octal bytes only when all three digits are valid and the first
    is 0 through 3.
    
    Assisted-by: GPT 5.6
    Co-authored-by: GPT 5.6 <codex@openai.com>
    Byron and codex committed Aug 11, 2026
    Configuration menu
    Copy the full SHA
    9a92677 View commit details
    Browse the repository at this point in the history
  3. Merge pull request #2213 from gitpython-developers/config-sanitizer-f…

    …ollow-up
    
    Preserve Git config escape semantics
    Byron authored Aug 11, 2026
    Configuration menu
    Copy the full SHA
    4b9afe9 View commit details
    Browse the repository at this point in the history
  4. fix: parse actor identities without regular expressions

    <!-- agent -->
    GHSA-g5vv-9gxw-82hx reports quadratic backtracking when an actor
    identity contains a long unterminated email delimiter.
    
    Add a regression that exercises a 20,000-character malformed identity,
    then replace both actor regexes with direct delimiter scans following
    Git's first-opening, first-closing delimiter behavior. Keep GitPython's
    whole-string fallback when either delimiter is absent.
    
    Reference Git baseline cf5497b14c5a24f10c13f7e0ee85cb95
    ident.c::split_ident_line and its invalid-committer cases in
    t/t9300-fast-import.sh. Also reference gix-actor's signature decoder and
    lenient identity tests.
    
    Assisted-by: GPT 5.6
    Co-authored-by: GPT 5.6 <codex@openai.com>
    Byron and codex committed Aug 11, 2026
    Configuration menu
    Copy the full SHA
    751473a View commit details
    Browse the repository at this point in the history
  5. Merge pull request #2215 from gitpython-developers/various-fixes

    Harden diff path and actor identity parsing
    Byron authored Aug 11, 2026
    Configuration menu
    Copy the full SHA
    f44c1fb View commit details
    Browse the repository at this point in the history

Commits on Aug 17, 2026

  1. fix: require opt-in for no-index diffs

    <!-- agent -->
    Treat --no-index as an unsafe diff option because it changes path operands
    from repository pathspecs to arbitrary filesystem paths. This addresses
    GHSA-whh4-5q6c-9v3x without exposing advisory reproduction details.
    
    Assisted-by: GPT 5.6
    Co-authored-by: GPT 5.6 <codex@openai.com>
    Byron and codex committed Aug 17, 2026
    Configuration menu
    Copy the full SHA
    09f2cf3 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #2217 from gitpython-developers/fix-advisory

    Require explicit opt-in for filesystem diffs
    Byron authored Aug 17, 2026
    Configuration menu
    Copy the full SHA
    d160fb4 View commit details
    Browse the repository at this point in the history

Commits on Aug 25, 2026

  1. fix: prefer .git during repository discovery

    <!-- agent -->
    GitPython considered worktree administration and bare-repository signatures
    before a worktree's real .git entry. Align discovery with Git so .git files
    and directories win, malformed .git files stop discovery, and candidate git
    directories validate HEAD plus commondir-backed object and ref storage. This
    addresses GHSA-239g-whfq-7xj9.
    
    Regression coverage compares ambiguous layouts with git rev-parse and rejects
    invalid HEAD/.git metadata.
    
    Git baseline: 15c6308cf7ad276b306aa5b3ababfbdebfb1a917; setup.c
    setup_git_directory_gently_1(), is_git_directory(), and validate_headref().
    
    Repository validation can use GIT_COMMON_DIR for refs and objects. Preserve the
    same value on Repo so later config, ref, and object access uses the directory
    that made discovery succeed.
    
    Capture GIT_COMMON_DIR before the first repository config read so bare-state
    detection uses the same metadata location as discovery. Resolve relative
    environment values immediately so later working-directory changes cannot
    retarget the Repo.
    
    Review feedback: relative GIT_COMMON_DIR left Git subprocesses resolving GIT_DIR
    and GIT_COMMON_DIR from a different working directory; malformed commondir data,
    empty GIT_OBJECT_DIRECTORY, and the linked-worktree signature were also handled
    inconsistently.
    
    Pin the repository environment to resolved paths, reject invalid
    metadata without consulting the process working directory, and
    restore HEAD-based linked-worktree detection. Keep the loose HEAD
    and dangling .git behavior because both match Git setup.c at baseline
    15c6308cf7ad276b306aa5b3ababfbdebfb1a917.
    
    Review feedback identified that chained or self-referential .git pointers
    recurse, filesystem-encoded metadata can fail text decoding, and a relative
    GIT_DIR is not retained for later Git commands.
    
    Parse one regular, size-bounded Gitfile exactly once, decode Gitfile and
    commondir paths with the filesystem codec, and retain the resolved GIT_DIR
    for subprocesses. This rejects cycles like Git instead of recursing and keeps
    commands stable after working-directory changes.
    
    Review feedback noted that a dangling commondir symlink was treated as absent,
    allowing local objects and refs to validate the repository.
    
    Distinguish a truly missing commondir from a dangling symlink. This follows
    Git's get_common_dir_noenv(), whose file_exists check uses lstat before
    attempting to read the entry.
    
    Python 3.9 on Windows raised UnicodeDecodeError while the repository-discovery
    regression test parsed invalid commondir bytes, causing the Python package test
    (windows, 3.9) check to fail.
    
    Treat UnicodeError like an unreadable metadata file in both commondir and
    gitfile parsing. Invalid bytes now make discovery reject the candidate
    repository, matching Git's behavior.
    
    Review feedback noted that GIT_OBJECT_DIRECTORY made discovery succeed without
    becoming the Repo ODB root, while a relative value could later be resolved from
    the Git wrapper's different working directory.
    
    Resolve the environment value against the construction directory, use it as the
    ODB root, and preserve the absolute value for later Git commands. The regression
    moves the only object store outside the git directory and verifies access
    through both GitDB and git cat-file after the original environment and current
    directory are restored.
    
    Review feedback identified four setup mismatches: non-missing .git stat failures
    could fall through to another repository, explicit GIT_DIR could be redirected
    through a nested .git entry, Gitfile reads were not bounded to the stat-reported
    size, and alternates ignored GIT_OBJECT_DIRECTORY.
    
    Match Git setup.c by bypassing discovery for an environment-selected GIT_DIR,
    stopping discovery when Gitfile stat fails for reasons other than a missing
    path, and reading exactly the previously observed Gitfile size. Resolve
    alternates below the active ODB root so custom object stores remain internally
    consistent.
    
    The commit review noted that treating every present GIT_DIR as explicit broke
    two documented cases: an empty GIT_DIR must fall back to current-directory
    discovery, while an empty Repo path must still use a nonempty GIT_DIR.
    
    Assisted-by: GPT 5.6
    Co-authored-by: GPT 5.6 <codex@openai.com>
    Byron and codex committed Aug 25, 2026
    Configuration menu
    Copy the full SHA
    c7cf4d1 View commit details
    Browse the repository at this point in the history
  2. prepare new release

    Byron committed Aug 25, 2026
    Configuration menu
    Copy the full SHA
    56636c3 View commit details
    Browse the repository at this point in the history
  3. Merge pull request #2218 from gitpython-developers/fix-repo-open

    Fix repository discovery precedence
    Byron authored Aug 25, 2026
    Configuration menu
    Copy the full SHA
    3481da9 View commit details
    Browse the repository at this point in the history
Loading