Remove commented-out code
Cleaned up old bd-160 export hash tracking code that was disabled. Removed unnecessary test comments. Amp-Thread-ID: https://ampcode.com/threads/T-de38a626-a425-414f-92d8-102bc1519c8b Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
@@ -458,35 +458,10 @@ func writeJSONLAtomic(jsonlPath string, issues []*types.Issue) ([]string, error)
|
||||
exportedIDs := make([]string, 0, len(issues))
|
||||
|
||||
for _, issue := range issues {
|
||||
// DISABLED: timestamp-only deduplication causes data loss (bd-160)
|
||||
// skip, err := shouldSkipExport(ctx, issue)
|
||||
// if err != nil {
|
||||
// if os.Getenv("BD_DEBUG") != "" {
|
||||
// fmt.Fprintf(os.Stderr, "Debug: failed to check if %s should skip: %v\n", issue.ID, err)
|
||||
// }
|
||||
// skip = false
|
||||
// }
|
||||
// if skip {
|
||||
// skippedCount++
|
||||
// continue
|
||||
// }
|
||||
|
||||
if err := encoder.Encode(issue); err != nil {
|
||||
return nil, fmt.Errorf("failed to encode issue %s: %w", issue.ID, err)
|
||||
return nil, fmt.Errorf("failed to encode issue %s: %w", issue.ID, err)
|
||||
}
|
||||
|
||||
// DISABLED: export hash tracking (bd-160)
|
||||
// contentHash, err := computeIssueContentHash(issue)
|
||||
// if err != nil {
|
||||
// if os.Getenv("BD_DEBUG") != "" {
|
||||
// fmt.Fprintf(os.Stderr, "Debug: failed to compute hash for %s: %v\n", issue.ID, err)
|
||||
// }
|
||||
// } else if err := store.SetExportHash(ctx, issue.ID, contentHash); err != nil {
|
||||
// if os.Getenv("BD_DEBUG") != "" {
|
||||
// fmt.Fprintf(os.Stderr, "Debug: failed to save export hash for %s: %v\n", issue.ID, err)
|
||||
// }
|
||||
// }
|
||||
|
||||
exportedIDs = append(exportedIDs, issue.ID)
|
||||
}
|
||||
|
||||
|
||||
@@ -236,33 +236,11 @@ Output to stdout by default, or use -o flag for file output.`,
|
||||
exportedIDs := make([]string, 0, len(issues))
|
||||
skippedCount := 0
|
||||
for _, issue := range issues {
|
||||
// DISABLED: timestamp-only deduplication causes data loss (bd-160)
|
||||
// The export_hashes table gets out of sync with JSONL after git operations,
|
||||
// causing exports to skip issues that aren't actually in the file.
|
||||
//
|
||||
// skip, err := shouldSkipExport(ctx, issue)
|
||||
// if err != nil {
|
||||
// fmt.Fprintf(os.Stderr, "Warning: failed to check if %s should skip: %v\n", issue.ID, err)
|
||||
// skip = false
|
||||
// }
|
||||
// if skip {
|
||||
// skippedCount++
|
||||
// continue
|
||||
// }
|
||||
|
||||
if err := encoder.Encode(issue); err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error encoding issue %s: %v\n", issue.ID, err)
|
||||
os.Exit(1)
|
||||
fmt.Fprintf(os.Stderr, "Error encoding issue %s: %v\n", issue.ID, err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
// DISABLED: export hash tracking (bd-160)
|
||||
// contentHash, err := computeIssueContentHash(issue)
|
||||
// if err != nil {
|
||||
// fmt.Fprintf(os.Stderr, "Warning: failed to compute hash for %s: %v\n", issue.ID, err)
|
||||
// } else if err := store.SetExportHash(ctx, issue.ID, contentHash); err != nil {
|
||||
// fmt.Fprintf(os.Stderr, "Warning: failed to save export hash for %s: %v\n", issue.ID, err)
|
||||
// }
|
||||
|
||||
exportedIDs = append(exportedIDs, issue.ID)
|
||||
}
|
||||
|
||||
|
||||
@@ -207,8 +207,6 @@ func setupClone(t *testing.T, tmpDir, remoteDir, name, bdPath string) string {
|
||||
runCmd(t, cloneDir, bdCmd, "init", "--quiet", "--prefix", "test")
|
||||
}
|
||||
|
||||
// Skip git hooks installation in tests - not needed and slows things down
|
||||
// installGitHooks(t, cloneDir)
|
||||
return cloneDir
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user