fix: enforce classified Git admission paths (#2150) (#2181)

This commit is contained in:
Carlos Florêncio
2026-08-03 11:04:34 +01:00
committed by GitHub
parent 069cc99e10
commit 431e5d40fe
71 changed files with 3130 additions and 357 deletions
@@ -3,6 +3,8 @@ package worktree
import (
"context"
"os/exec"
"github.com/kandev/kandev/internal/common/subproc"
)
// newGitCommand enables Git's long-path handling for this process only. Git
@@ -13,5 +15,5 @@ func newGitCommand(ctx context.Context, args ...string) *exec.Cmd {
commandArgs := make([]string, 0, len(args)+2)
commandArgs = append(commandArgs, "-c", "core.longpaths=true")
commandArgs = append(commandArgs, args...)
return exec.CommandContext(ctx, "git", commandArgs...)
return subproc.NewGitCommand(ctx, commandArgs...)
}