--include, --exclude — filter rules (currently supported only as filename globs)
--filter — rich include/exclude rule language with include/exclude/delete/protect actions
--files-from=FILE — transfer only paths listed in a file
--exclude-from=FILE, --include-from=FILE — read patterns from a file
Current FastSync behavior: scanner.c:111-135 matches --exclude/--include only against entry->d_name (the bare filename), using a simple glob matcher in utils.c:59. There is no support for directory matching, anchored paths, rule files, or rsync-style filter syntax.
Config fields: add FilterRule* filter_rules list; each rule has type (include/exclude), pattern, and anchor flags
Scanner changes:
Match against the full relative path, not just the filename
Support anchored patterns (/foo), directory patterns (foo/), and recursive rules (**)
Support --files-from to bypass directory scanning and only transfer listed paths
Protocol: no wire changes; filters are applied client-side
Priority: medium Rationale: Advanced filtering is essential for syncing large trees (e.g., exclude all .git/ directories anywhere, include only a specific subtree). Current filename-only globs are too limited.
Acceptance criteria:
--exclude '/build/' excludes any directory named build at any depth
--files-from=list.txt transfers exactly the listed relative paths
--filter='- *.tmp' produces the same result as --exclude '*.tmp'
Integration tests cover path-anchored rules and --files-from
**Corresponding rsync flags/behavior:**
- `--include`, `--exclude` — filter rules (currently supported only as filename globs)
- `--filter` — rich include/exclude rule language with include/exclude/delete/protect actions
- `--files-from=FILE` — transfer only paths listed in a file
- `--exclude-from=FILE`, `--include-from=FILE` — read patterns from a file
**Current FastSync behavior:**
`scanner.c:111-135` matches `--exclude`/`--include` only against `entry->d_name` (the bare filename), using a simple glob matcher in `utils.c:59`. There is no support for directory matching, anchored paths, rule files, or rsync-style filter syntax.
**Proposed changes:**
- CLI flags: `--filter`, `--files-from=<file>`, `--exclude-from=<file>`, `--include-from=<file>`
- Config fields: add `FilterRule* filter_rules` list; each rule has type (include/exclude), pattern, and anchor flags
- Scanner changes:
- Match against the full relative path, not just the filename
- Support anchored patterns (`/foo`), directory patterns (`foo/`), and recursive rules (`**`)
- Support `--files-from` to bypass directory scanning and only transfer listed paths
- Protocol: no wire changes; filters are applied client-side
**Priority:** medium
**Rationale:** Advanced filtering is essential for syncing large trees (e.g., exclude all `.git/` directories anywhere, include only a specific subtree). Current filename-only globs are too limited.
**Acceptance criteria:**
- [ ] `--exclude '/build/'` excludes any directory named `build` at any depth
- [ ] `--files-from=list.txt` transfers exactly the listed relative paths
- [ ] `--filter='- *.tmp'` produces the same result as `--exclude '*.tmp'`
- [ ] Integration tests cover path-anchored rules and `--files-from`
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Corresponding rsync flags/behavior:
--include,--exclude— filter rules (currently supported only as filename globs)--filter— rich include/exclude rule language with include/exclude/delete/protect actions--files-from=FILE— transfer only paths listed in a file--exclude-from=FILE,--include-from=FILE— read patterns from a fileCurrent FastSync behavior:
scanner.c:111-135matches--exclude/--includeonly againstentry->d_name(the bare filename), using a simple glob matcher inutils.c:59. There is no support for directory matching, anchored paths, rule files, or rsync-style filter syntax.Proposed changes:
--filter,--files-from=<file>,--exclude-from=<file>,--include-from=<file>FilterRule* filter_ruleslist; each rule has type (include/exclude), pattern, and anchor flags/foo), directory patterns (foo/), and recursive rules (**)--files-fromto bypass directory scanning and only transfer listed pathsPriority: medium
Rationale: Advanced filtering is essential for syncing large trees (e.g., exclude all
.git/directories anywhere, include only a specific subtree). Current filename-only globs are too limited.Acceptance criteria:
--exclude '/build/'excludes any directory namedbuildat any depth--files-from=list.txttransfers exactly the listed relative paths--filter='- *.tmp'produces the same result as--exclude '*.tmp'--files-from