Skip to content

fix(exclude): match repo by origin remote name not worktree basename - #72

Merged
chess-seventh merged 1 commit into
masterfrom
fix/l58-exclude-by-remote
Jul 26, 2026
Merged

chess-seventh merged 1 commit into
masterfrom
fix/l58-exclude-by-remote

Conversation

@chess-seventh

Copy link
Copy Markdown
Owner

Lane L58. Fixes the commit-diary [exclude] gap found in L57: a commit made from a git worktree was never matched against the exclude list because the repo was identified by the worktree directory basename, so worktree commits flooded the Obsidian diary (blocks the L49 wt workflow).

Resolves canonical repo identity from the origin remote URL (stable across all worktrees) instead of the workdir basename; one claude-src entry now covers all its worktrees. Falls back to the workdir basename when there is no origin.

  • new repo_name_from_url, canonical_repo_name, current_repo_canonical_name (src/vim_commit.rs); run_commit_saver switched to the canonical resolver.
  • tests: worktree regression (mutation-proven teeth), URL-form variants, empty/sentinel guard, no-origin fallback; existing exclusion test updated to the canonical name.
  • gate: devenv shell -- pre-check green — clippy -D warnings, 127 tests, build.

Brief: docs/feature/L58-exclude-by-remote/brief.md

Repo exclusion identified the repository by its worktree directory
basename (repo.workdir() -> file_name()), so a commit made from a git
worktree (basename = lane name, not repo name) never matched the
[exclude] list and flooded the Obsidian diary. This blocked clean use of
the L49 wt worktree workflow.

- resolve canonical identity from the origin remote URL (stable across
  worktrees) via new repo_name_from_url + canonical_repo_name +
  current_repo_canonical_name; run_commit_saver now uses the canonical
  name. Fall back to the workdir basename when there is no origin.
- one "claude-src" exclude entry now covers all of its worktrees.
- tests: worktree regression (origin name beats basename), URL-form
  variants + empty/sentinel, no-origin fallback; existing exclusion test
  switched to the canonical name. Gate: devenv pre-check green (clippy
  -D warnings + 127 tests + build).

Refs: docs/feature/L58-exclude-by-remote/brief.md

Co-Authored-By: Vulcan <chess7th@pm.me>
@codecov

codecov Bot commented Jul 26, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.91525% with 3 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/vim_commit.rs 94.91% 3 Missing ⚠️

📢 Thoughts on this report? Let us know!

@chess-seventh
chess-seventh merged commit 876aa41 into master Jul 26, 2026
6 checks passed
@chess-seventh
chess-seventh deleted the fix/l58-exclude-by-remote branch July 26, 2026 10:18
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.

1 participant