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.52
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: 3.1.53
Choose a head ref
  • 14 commits
  • 12 files changed
  • 4 contributors

Commits on Jul 16, 2026

  1. feat(submodule): add deinit method to Submodule (#2014)

    Mirrors the pattern of `Submodule.add`, `Submodule.update`, and
    `Submodule.remove` by exposing `git submodule deinit` as a first-class
    method, so callers no longer need the `repo.git.submodule('deinit', ...)`
    workaround noted in the issue.
    
    The method delegates to `git submodule deinit [--force] -- <path>` via
    `self.repo.git.submodule`, decorated with `@unbare_repo` to match the
    other mutating Submodule methods. It unregisters the submodule from
    `.git/config` and clears the working-tree directory while leaving
    `.gitmodules` and `.git/modules/<name>` intact, so a later `update()`
    can re-initialize.
    mvanhorn authored and Byron committed Jul 16, 2026
    Configuration menu
    Copy the full SHA
    d702d9a View commit details
    Browse the repository at this point in the history
  2. review

    Byron committed Jul 16, 2026
    Configuration menu
    Copy the full SHA
    0c0cc8a View commit details
    Browse the repository at this point in the history
  3. typing: introduce sensible basedpyright defaults

    That way it dosesn't all light up immediately in dev mode.
    Byron committed Jul 16, 2026
    Configuration menu
    Copy the full SHA
    6d0b6a4 View commit details
    Browse the repository at this point in the history
  4. Merge pull request #2129 from mvanhorn/feat/2014-submodule-deinit

    feat(submodule): add deinit method to Submodule (#2014)
    Byron authored Jul 16, 2026
    Configuration menu
    Copy the full SHA
    e87854b View commit details
    Browse the repository at this point in the history
  5. Merge pull request #2174 from gitpython-developers/basedpyright

    typing: introduce sensible basedpyright defaults
    Byron authored Jul 16, 2026
    Configuration menu
    Copy the full SHA
    f89e18c View commit details
    Browse the repository at this point in the history
  6. fix: make submodule.update() after submodule.deinit() work

    Git's `submodule deinit` command removes the submodule checkout but retains
    its repository under the parent repository's `.git/modules` directory.
    
    Submodule.update() previously treated the missing checkout as a completely
    uninitialized submodule and attempted to clone it again. The clone could not
    reuse the existing module repository, preventing a deinitialized submodule
    from being initialized again through GitPython.
    
    Detect a valid retained repository before entering the clone path. Restore
    the checkout's `.git` file and the module repository's worktree
    configuration, reset the retained repository to recreate its index and
    working tree, and restore the submodule URL in the parent configuration.
    Continue using the existing clone behavior when no valid retained repository
    is available.
    
    Co-authored-by: Sebastian Thiel <[email protected]>
    codex and Byron committed Jul 16, 2026
    Configuration menu
    Copy the full SHA
    b9d82c0 View commit details
    Browse the repository at this point in the history
  7. Merge pull request #2175 from gitpython-developers/submodule-deinit-fix

    fix: make `submodule.update()` after `submodule.deinit()` work
    Byron authored Jul 16, 2026
    Configuration menu
    Copy the full SHA
    15527ef View commit details
    Browse the repository at this point in the history

Commits on Jul 20, 2026

  1. Configuration menu
    Copy the full SHA
    5bc2560 View commit details
    Browse the repository at this point in the history
  2. fix: respect core.hooksPath for commit hooks

    Use git rev-parse --git-path when resolving commit hook paths so GitPython follows Git's core.hooksPath configuration.\n\nAdd regression coverage for a pre-commit hook stored in a custom hooks path.\n\nFixes #2083
    Siesta authored and Byron committed Jul 20, 2026
    Configuration menu
    Copy the full SHA
    406b98e View commit details
    Browse the repository at this point in the history
  3. Address review feedback about hook resolution

    - Review feedback: resolve core.hooksPath only when configured, avoid an
    unconditional git rev-parse dependency, and cover relative paths in a non-bare
    repository.
    - Read the effective Git configuration directly so unconfigured repositories
    retain the legacy .git/hooks lookup and configured relative paths resolve from
    the directory where hooks execute. Exercise both guarantees in the hook tests.
    - Review feedback: core.hooksPath can point outside index.repo.working_dir,
    where Path.relative_to() raises on Windows and prevents a valid hook from
    running.
    - Build the Bash argument with os.path.relpath so hooks in parent or other
    absolute locations remain executable. Fall back to the absolute POSIX-form
    path when Windows cannot form a relative path across drives, and add a focused
    command-construction regression test.
    codex authored and Byron committed Jul 20, 2026
    Configuration menu
    Copy the full SHA
    9bc287a View commit details
    Browse the repository at this point in the history
  4. Merge pull request #2159 from Siesta0217/fix-core-hooks-path-commit-h…

    …ooks
    
    Fix commit hooks respecting core.hooksPath
    Byron authored Jul 20, 2026
    Configuration menu
    Copy the full SHA
    354eb2f View commit details
    Browse the repository at this point in the history
  5. fix: validate config section delimiters

    GHSA-3rp5-jjmw-4wv2 identified that configuration section names could alter the
    structure of serialized config despite the existing control-character checks.
    
    Reject unquoted closing section delimiters across all writer entry points
    while preserving valid delimiters inside quoted subsections and the
    existing option-name behavior. Add regression coverage for unsafe plain and
    quoted-subsection-shaped names as well as a valid quoted subsection.
    
    Git baseline: a23bace963d508bd96983cc637131392d3face18. Git config parsing
    treats an unquoted closing bracket as the end of a basic section header, while
    its extended form permits brackets inside a quoted subsection and requires a
    final bracket after the closing quote.
    
    Co-authored-by: Sebastian Thiel <[email protected]>
    codex and Byron committed Jul 20, 2026
    Configuration menu
    Copy the full SHA
    1ed1b92 View commit details
    Browse the repository at this point in the history
  6. Merge pull request #2176 from gitpython-developers/fix-config-injection

    fix: validate config section delimiters
    Byron authored Jul 20, 2026
    Configuration menu
    Copy the full SHA
    6a5eb6a View commit details
    Browse the repository at this point in the history
  7. prepare for security fix

    Byron committed Jul 20, 2026
    Configuration menu
    Copy the full SHA
    faf3c09 View commit details
    Browse the repository at this point in the history
Loading