MCPcopy
hub / github.com/remix-run/react-router / gitInitQuestionStep

Function gitInitQuestionStep

packages/create-react-router/index.ts:496–515  ·  view source on GitHub ↗
(ctx: Context)

Source from the content-addressed store, hash-verified

494}
495
496async function gitInitQuestionStep(ctx: Context) {
497 if (existsSync(path.join(ctx.cwd, ".git"))) {
498 info("Nice!", `Git has already been initialized`);
499 return;
500 }
501
502 let git = ctx.git;
503 if (ctx.git === undefined) {
504 ({ git } = await ctx.prompt({
505 name: "git",
506 type: "confirm",
507 label: title("git"),
508 message: `Initialize a new git repository?`,
509 hint: "recommended",
510 initial: true,
511 }));
512 }
513
514 ctx.git = git ?? false;
515}
516
517async function gitInitStep(ctx: Context) {
518 if (!ctx.git) {

Callers

nothing calls this directly

Calls 2

infoFunction · 0.90
titleFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…