Fix auto-import git history backfill bug (bd-4pv)
Auto-import was allowing git history backfill to run, which could incorrectly purge issues. The fix adds NoGitHistory=true to all auto-import code paths: - autoimport.go (importFromGit) - autoflush.go (autoImportIfNewer) - daemon_sync.go (importToJSONLWithStore) Git history backfill is designed to detect deletions that happened after a local DB was created. During auto-import, there is no local work to protect - we are importing from the authoritative JSONL source. Also adds comprehensive tests for NoGitHistory behavior. Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -207,10 +207,10 @@ func importFromGit(ctx context.Context, dbFilePath string, store storage.Storage
|
||||
// Note: SkipPrefixValidation allows mixed prefixes during auto-import
|
||||
// (but now we set the prefix first, so CreateIssue won't use filename fallback)
|
||||
opts := ImportOptions{
|
||||
|
||||
DryRun: false,
|
||||
SkipUpdate: false,
|
||||
SkipPrefixValidation: true, // Auto-import is lenient about prefixes
|
||||
DryRun: false,
|
||||
SkipUpdate: false,
|
||||
SkipPrefixValidation: true, // Auto-import is lenient about prefixes
|
||||
NoGitHistory: true, // Skip git history backfill during auto-import (bd-4pv)
|
||||
}
|
||||
|
||||
_, err = importIssuesCore(ctx, dbFilePath, store, issues, opts)
|
||||
|
||||
Reference in New Issue
Block a user