mirror of
https://github.com/garrytan/gbrain.git
synced 2026-07-31 04:07:52 +00:00
merge: #2020 fix(sync): skip Python venv/ in the code walker
Reviewed: same walker as #2052; venv glob addition. Resolved on top of #2052. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> # Conflicts: # src/commands/import.ts # src/core/sync.ts
This commit is contained in:
@@ -610,7 +610,7 @@ export function collectSyncableFiles(dir: string, opts: CollectOpts = {}): strin
|
||||
// Descent-time prune through the canonical gate (single source of truth
|
||||
// in core/sync.ts) instead of a hand-maintained inline list that drifted
|
||||
// from it. Skips hidden dirs (`.git`, `.raw`, etc.), `node_modules`,
|
||||
// `vendor`, `dist`, `build`, `ops`, and git submodules.
|
||||
// `vendor`, `dist`, `build`, `venv` (#2020), `ops`, and git submodules.
|
||||
if (!pruneDir(entry, d)) continue;
|
||||
|
||||
const full = join(d, entry);
|
||||
|
||||
@@ -249,6 +249,11 @@ const PRUNE_DIR_NAMES = new Set<string>([
|
||||
'vendor',
|
||||
'dist',
|
||||
'build',
|
||||
// Python venv: vendored dependency tree, the `node_modules` analogue (#2020).
|
||||
// Like `node_modules` it lacks a leading dot so isSyncable's dot-prefix
|
||||
// exclusion misses it; explicit entry keeps incremental sync consistent
|
||||
// with the first-sync walker in commands/import.ts.
|
||||
'venv',
|
||||
'.raw',
|
||||
'ops',
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user