fix: resolve govet shadow warnings in merge conflict test
Rename err variables to avoid shadowing the outer CreateWorktree error. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
ac44bf2f3c
commit
08a5038f47
1 changed files with 6 additions and 6 deletions
|
|
@ -243,9 +243,9 @@ func TestMergeWorktreeBranch_Conflict(t *testing.T) {
|
||||||
dir := initTestRepo(t)
|
dir := initTestRepo(t)
|
||||||
wtPath := filepath.Join(dir, ".picoclaw", "worktrees", "merge-conflict")
|
wtPath := filepath.Join(dir, ".picoclaw", "worktrees", "merge-conflict")
|
||||||
|
|
||||||
wt, err := CreateWorktree(dir, wtPath, "plan/merge-conflict")
|
wt, createErr := CreateWorktree(dir, wtPath, "plan/merge-conflict")
|
||||||
if err != nil {
|
if createErr != nil {
|
||||||
t.Fatalf("CreateWorktree: %v", err)
|
t.Fatalf("CreateWorktree: %v", createErr)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make a change on the base branch
|
// Make a change on the base branch
|
||||||
|
|
@ -270,9 +270,9 @@ func TestMergeWorktreeBranch_Conflict(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Verify base branch file is unchanged (merge was aborted)
|
// Verify base branch file is unchanged (merge was aborted)
|
||||||
content, err := os.ReadFile(filepath.Join(dir, "conflict.txt"))
|
content, readErr := os.ReadFile(filepath.Join(dir, "conflict.txt"))
|
||||||
if err != nil {
|
if readErr != nil {
|
||||||
t.Fatalf("ReadFile: %v", err)
|
t.Fatalf("ReadFile: %v", readErr)
|
||||||
}
|
}
|
||||||
if string(content) != "base content" {
|
if string(content) != "base content" {
|
||||||
t.Errorf("conflict.txt = %q, want %q (merge should have been aborted)", string(content), "base content")
|
t.Errorf("conflict.txt = %q, want %q (merge should have been aborted)", string(content), "base content")
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue