Skip to content

Complete folder sync implementation: exclude patterns and duplicate command fix#326

Merged
neongreen merged 4 commits intoemily/jj-zpnqzkkwrtryfrom
copilot/finish-folder-sync-implementation
Nov 28, 2025
Merged

Complete folder sync implementation: exclude patterns and duplicate command fix#326
neongreen merged 4 commits intoemily/jj-zpnqzkkwrtryfrom
copilot/finish-folder-sync-implementation

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Nov 28, 2025

The folder sync feature had unfinished work: exclude patterns (--exclude) were saved to config but never used, and statusCmd was registered twice causing duplicate help entries.

Changes

Exclude pattern implementation

  • Added DetectDriftWithExcludes() to filter files during drift detection
  • Updated all folder operations to pass exclude patterns: track, status, sync, import, apply
  • Patterns match against both base filename and full relative path via filepath.Match
# Now works as expected
conf track ~/scripts --name scripts --exclude "*.tmp" --exclude ".DS_Store"
conf status scripts  # *.tmp and .DS_Store files excluded from drift detection

Bug fixes

  • Removed duplicate statusCmd registration from root.go (already registered in status.go init)
  • Fixed grammar: "1 file with drift" vs "2 files with drift"

Tests

  • Added drift_test.go: drift detection, exclude patterns, summary formatting
  • Added sync_test.go: ImportFile, ApplyFile, DeleteFile, ImportAll, ApplyAll
Original prompt

finish any unfinished work in the folder sync implementation


💡 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 3 commits November 28, 2025 20:01
… registration

Co-authored-by: neongreen <1523306+neongreen@users.noreply.github.com>
…summary

Co-authored-by: neongreen <1523306+neongreen@users.noreply.github.com>
Co-authored-by: neongreen <1523306+neongreen@users.noreply.github.com>
Copilot AI changed the title [WIP] Complete unfinished work in folder sync implementation Complete folder sync implementation: exclude patterns and duplicate command fix Nov 28, 2025
Copilot AI requested a review from neongreen November 28, 2025 20:10
@neongreen neongreen marked this pull request as ready for review November 28, 2025 20:50
@mergify
Copy link
Copy Markdown

mergify Bot commented Nov 28, 2025

🧪 CI Insights

Here's what we observed from your CI run for 8427a9a.

🟢 All jobs passed!

But CI Insights is watching 👀

@neongreen neongreen merged commit 8e16e3e into emily/jj-zpnqzkkwrtry Nov 28, 2025
0 of 4 checks passed
@neongreen neongreen deleted the copilot/finish-folder-sync-implementation branch November 28, 2025 22:51
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