Skip to content

docs(repo): trim repo_path() docstring - #2363

Merged
max-sixty merged 1 commit into
mainfrom
2322-submodule-probe
Apr 21, 2026
Merged

max-sixty merged 1 commit into
mainfrom
2322-submodule-probe

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Doc-only follow-up to #2350 / #2362. The docstring on Repository::repo_path() had grown to ~45 lines during the scope-handling fix; trimming it to ~25 without dropping any of the reasoning that would cause accidental regressions.

Kept (load-bearing):

  • Why we anchor on git_common_dir (linked-worktree invariant)
  • The three-case resolution table
  • Why submodules need core.worktree (or someone removes the probe)
  • Why we delegate to rev-parse instead of trusting the bulk map directly (or someone re-introduces the perf(repo): skip submodule rev-parse probe via core.worktree in bulk config #2350 scope bug)
  • The "common case skips the subprocess" perf note (or someone always probes)

Trimmed:

  • "# Why we anchor" heading → folded into the lead-in
  • "(or [includeIf]-imported)" parenthetical
  • One redundant sentence restating that git ignores global core.worktree
  • Minor phrasing cleanup

This was written by Claude Code on behalf of @max-sixty

…tionale

Fold "# Why we anchor on git_common_dir" into a lead-in to the resolution
table and drop the pedantic "(or `[includeIf]`-imported)" parenthetical
plus one redundant sentence. Keep the table, the submodule rationale, the
scope-ambiguity explanation, and the "common case skips the subprocess"
note — all load-bearing, because removing any of them invites the kind of
refactor that #2350 / #2362 had to undo.

Co-Authored-By: Claude <[email protected]>
@max-sixty
max-sixty merged commit 80ca4ef into main Apr 21, 2026
25 checks passed
@max-sixty
max-sixty deleted the 2322-submodule-probe branch April 21, 2026 22:38
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.

2 participants