fix: initialize new repositories with a main branch (#2297)
This commit is contained in:
@@ -18,7 +18,15 @@ func CommandContext(ctx context.Context, targetPath string, _ *os.File) (*exec.C
|
||||
return command, nil
|
||||
}
|
||||
|
||||
func runInheritedDirectory(string) int {
|
||||
// CommitCommandContext creates a Git commit command for targetPath.
|
||||
func CommitCommandContext(ctx context.Context, targetPath string, _ *os.File, args ...string) (*exec.Cmd, error) {
|
||||
command := subproc.NewGitCommand(ctx, args...)
|
||||
command.Dir = targetPath
|
||||
command.Env = withIsolatedCommitEnvironment(os.Environ())
|
||||
return command, nil
|
||||
}
|
||||
|
||||
func runInheritedDirectory(string, []string) int {
|
||||
fmt.Fprintln(os.Stderr, "git init helper is unsupported on this platform")
|
||||
return 2
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user