Skip to content

fix: a conflicted pull --pin records the pin on commit - #174

Merged
thorsten-klein merged 1 commit into
mainfrom
fix/pull-conflict-pin
Oct 23, 2026
Merged

thorsten-klein merged 1 commit into
mainfrom
fix/pull-conflict-pin

Conversation

@thorsten-klein

Copy link
Copy Markdown
Owner

What this changes

git nested commit takes --pin. When a pull --pin <commit> stops on a conflict, step 7 of the printed help is git nested commit --pin=<commit> <subdir>, so the pin goes into .gitnested like it does for a pull without conflicts. This follows how --file is already passed on.

Why

The pin was lost: .gitnested kept the old pin (or none), and the next plain pull moved past it to the newest commit of the branch. Fixes #173

Checklist

  • uv run poe all passes (ruff, mypy, pyright, bandit, complexipy, and the
    tests at 100% coverage) — locally pip-audit reports CVEs in certifi/virtualenv (unrelated, also on main) and test_gpg_sign_signs_the_commit_and_the_nested_commits fails without a gpg agent (also on main); all else passes, coverage 100%
  • New behaviour has a test (test_pull_conflict_keeps_the_pin, runs the printed step 7)
  • README / --help / the man page updated, if the change is visible to users (doc/cli/commit.md, doc/guides/conflicts.md; --help comes from the spec)
  • The PR title reads as a Conventional Commit
    (feat:, fix:, docs:, …) — it becomes the squash-merge commit message
    and the changelog line

🤖 Generated with Claude Code

@codecov

codecov Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (795486e) to head (67aad70).
⚠️ Report is 4 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##              main      #174   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           45        45           
  Lines         2119      2122    +3     
=========================================
+ Hits          2119      2122    +3     
Files with missing lines Coverage Δ
src/git_nested/cli/spec.py 100.00% <ø> (ø)
src/git_nested/commands/pull.py 100.00% <100.00%> (ø)
src/git_nested/messages.py 100.00% <100.00%> (ø)

thorsten-klein added a commit that referenced this pull request Oct 23, 2026
## What this changes

`uv.lock` takes the newest versions of the packages pip-audit flags, and
of what they need:

| Package | From | To |
|---|---|---|
| certifi | 2026.7.22 | 2026.10.23 |
| virtualenv | 21.14.5 | 21.14.13 |
| packaging | 26.0 | 26.3 |
| typing-extensions | 4.15.0 | 4.16.0 |

virtualenv 21.14.13 needs packaging >= 26.3 and, on Python 3.10,
typing-extensions >= 4.16. Without those two bumps, uv keeps virtualenv
21.14.5 for Python 3.10, and pip-audit still fails there.

## Why

Every `test` job fails at `pip-audit`, before the tests run (e.g. on
#174 and #175):

- certifi 2026.7.22: PYSEC-2026-4320 (fixed in 2026.10.19)
- virtualenv 21.14.5: CVE-2026-113725 (fixed in 21.14.7),
CVE-2026-113722 (fixed in 21.14.9)

## Checklist

- [x] `uv run poe all` passes (ruff, mypy, pyright, bandit, complexipy,
and the
tests at 100% coverage) — locally pip-audit reports "No known
vulnerabilities found"; 737 passed, 100% coverage;
`test_gpg_sign_signs_the_commit_and_the_nested_commits` fails with git
2.34 only, fixed by #175
- [x] New behaviour has a test (no behaviour change)
- [x] README / `--help` / the man page updated, if the change is visible
to users (not visible)
- [x] The PR title reads as a [Conventional
Commit](https://www.conventionalcommits.org)
(`feat:`, `fix:`, `docs:`, …) — it becomes the squash-merge commit
message
      and the changelog line

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The pin of a pull that stops on a conflict was lost: `git nested commit`
had no `--pin`, so `.gitnested` kept the old pin, and the next pull
followed the newest commit of the branch. `commit` takes `--pin` now,
and the steps the pull prints pass it on.

Fixes #173

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@thorsten-klein
thorsten-klein merged commit 9d57c2c into main Oct 23, 2026
23 checks passed
@thorsten-klein
thorsten-klein deleted the fix/pull-conflict-pin branch October 23, 2026 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Conflicted pull --pin finished with git nested commit does not record the pin

1 participant