test: use filepath.Join for GIT_INDEX_FILE path (Copilot review) · Entire

test: use filepath.Join for GIT_INDEX_FILE path (Copilot review)

56408fa ·

Soph · 1w ago · 1 file · +2 added/-1 removed

Co-Authored-By: Claude Fable 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_012yi3hHGAGepwfrfjPETjGq

Sessions

4521fd749232 View transcript

Changes

1

3 unmodified lines

4
5
6
7
8
9
10
56 unmodified lines

67
68
69
69
70
71
72
73

3 unmodified lines

import (
    "os/exec"
    "path/filepath"
    "strings"
    "testing"

56 unmodified lines

runGit := func(stdin string, args ...string) string {
        c := exec.CommandContext(env.T.Context(), "git", args...)
        c.Dir = env.RepoDir
        c.Env = append(testutil.GitIsolatedEnv(), "GIT_INDEX_FILE="+env.RepoDir+"/.git/entire-orphan-index")
        c.Env = append(testutil.GitIsolatedEnv(), "GIT_INDEX_FILE="+filepath.Join(env.RepoDir, ".git", "entire-orphan-index"))
        if stdin != "" {
            c.Stdin = strings.NewReader(stdin)
        }

Mcmd/entire/cli/integration_test/divergence_matrix_test.go +2/-1