From ce119551f68614aa9c463d454a93f62f3b651c17 Mon Sep 17 00:00:00 2001 From: Steve Yegge Date: Fri, 5 Dec 2025 14:51:32 -0800 Subject: [PATCH] fix(init): use correct gitRef in error message, remove unused var MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Small fixes from code review: - Error message now shows actual gitRef instead of hardcoded HEAD - Removed unused lineNum variable in readFirstIssueFromGit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- cmd/bd/autoimport.go | 2 +- cmd/bd/init.go | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/cmd/bd/autoimport.go b/cmd/bd/autoimport.go index 729cb933..473abc5b 100644 --- a/cmd/bd/autoimport.go +++ b/cmd/bd/autoimport.go @@ -50,7 +50,7 @@ func checkAndAutoImport(ctx context.Context, store storage.Storage) bool { if err := importFromGit(ctx, dbPath, store, jsonlPath, gitRef); err != nil { if !jsonOutput { fmt.Fprintf(os.Stderr, "Warning: auto-import failed: %v\n", err) - fmt.Fprintf(os.Stderr, "Try manually: git show HEAD:%s | bd import -i /dev/stdin\n", jsonlPath) + fmt.Fprintf(os.Stderr, "Try manually: git show %s:%s | bd import -i /dev/stdin\n", gitRef, jsonlPath) } return false } diff --git a/cmd/bd/init.go b/cmd/bd/init.go index 47e7d5fd..51e9b619 100644 --- a/cmd/bd/init.go +++ b/cmd/bd/init.go @@ -1220,9 +1220,7 @@ func readFirstIssueFromGit(jsonlPath, gitRef string) (*types.Issue, error) { } scanner := bufio.NewScanner(bytes.NewReader(output)) - lineNum := 0 for scanner.Scan() { - lineNum++ line := scanner.Text() // skip empty lines