fix(sync): initialize store after daemon disconnect (GH#984)

The sync command was closing the daemon connection without initializing
the direct store, leaving store=nil. This caused errors in post-checkout
hook when running bd sync --import-only.

Fixed by using fallbackToDirectMode() which properly closes daemon and
initializes the store.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
grip
2026-01-09 22:53:36 -08:00
committed by Steve Yegge
parent f03c754df1
commit 351f4c1dd7
7 changed files with 110 additions and 414 deletions

View File

@@ -976,7 +976,7 @@ func (t *sqliteTxStorage) GetCustomStatuses(ctx context.Context) ([]string, erro
if value == "" {
return nil, nil
}
return parseCommaSeparated(value), nil
return parseCommaSeparatedList(value), nil
}
// GetCustomTypes retrieves the list of custom issue types from config within the transaction.
@@ -988,7 +988,7 @@ func (t *sqliteTxStorage) GetCustomTypes(ctx context.Context) ([]string, error)
if value == "" {
return nil, nil
}
return parseCommaSeparated(value), nil
return parseCommaSeparatedList(value), nil
}
// SetMetadata sets a metadata value within the transaction.