Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions src/lib/git.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { execFileSync } from "child_process";
import { PROJECT_DIR } from "./files.js";
import type { RunError } from "../types.js";

/**
* Run a git command safely using execFileSync (no shell injection).
Expand Down Expand Up @@ -30,11 +29,6 @@ export function run(argsOrCmd: string | string[], opts: { timeout?: number } = {
}
}

/** Convenience: run a raw command string (split on spaces). Only for simple, known-safe commands. */
function gitCmd(cmdStr: string, opts?: { timeout?: number }): string {
return run(cmdStr.split(/\s+/), opts);
}

/** Get the current branch name. */
export function getBranch(): string {
return run(["branch", "--show-current"]);
Expand Down
Loading