Skip to content

Add --match-relative-path duplicate filter and document ASCII-only case matching semantics#1

Merged
dictcp merged 7 commits intomasterfrom
copilot/create-local-pr-based-on-640
Mar 4, 2026
Merged

Add --match-relative-path duplicate filter and document ASCII-only case matching semantics#1
dictcp merged 7 commits intomasterfrom
copilot/create-local-pr-based-on-640

Conversation

Copy link

Copilot AI commented Mar 4, 2026

  • Review new PR feedback and locate affected comparison logic/tests
  • Re-apply regression test for --match-relative-path with explicit file inputs of different basenames
  • Run targeted tests for updated match-relative-path coverage (blocked: local build requires missing system dependency glib-2.0 >= 2.64)
  • Run final code review and CodeQL scan
  • Reply to new PR comment with commit hash

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits March 4, 2026 08:20
Co-authored-by: dictcp <1752436+dictcp@users.noreply.github.com>
Co-authored-by: dictcp <1752436+dictcp@users.noreply.github.com>
Copilot AI changed the title [WIP] Create local pull request based on PR 640 Add --match-relative-path duplicate filter and document ASCII-only case matching semantics Mar 4, 2026
Co-authored-by: dictcp <1752436+dictcp@users.noreply.github.com>
Co-authored-by: dictcp <1752436+dictcp@users.noreply.github.com>
@dictcp dictcp marked this pull request as ready for review March 4, 2026 08:48
Copilot AI review requested due to automatic review settings March 4, 2026 08:48
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a new duplicate-filtering mode, --match-relative-path, to restrict duplicate detection to files that share the same relative path across scanned roots, and updates the manpage to clarify the ASCII-only case-insensitive matching semantics used by these comparisons.

Changes:

  • Add --match-relative-path CLI flag and config plumbing.
  • Implement relative-path comparison (rm_file_relpaths_cmp) and integrate it into file grouping/comparison.
  • Add pytest coverage for relative-path matching and document ASCII-only case-insensitive behavior in the manpage.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/test_options/test_match_relative_path.py Adds option-level tests for positive/negative relative-path matching scenarios.
lib/preprocess.c Applies match_relative_path (and fixes early-return behavior for match_without_extension) during file comparison/grouping.
lib/file.h Declares the new relative-path comparison helper.
lib/file.c Implements rm_file_relpaths_cmp by comparing trie nodes up to the file’s traversal depth.
lib/cmdline.c Registers the new --match-relative-path command-line option.
lib/cfg.h Adds match_relative_path to runtime configuration.
docs/rmlint.1.rst Documents the new flag and clarifies ASCII-only case-insensitive matching semantics.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: dictcp <1752436+dictcp@users.noreply.github.com>
@dictcp dictcp merged commit 8d79154 into master Mar 4, 2026
16 checks passed
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.

3 participants