MCPcopy Create free account
hub / github.com/6pac/SlickGrid / hasUncommittedChanges

Function hasUncommittedChanges

scripts/git-utils.mjs:112–118  ·  view source on GitHub ↗
({ cwd, skipChecks })

Source from the content-addressed store, hash-verified

110 * @param {{ cwd: String, dryRun: Boolean; skipChecks: Boolean; }} options
111 */
112export async function hasUncommittedChanges({ cwd, skipChecks }) {
113 const execArgs = ['status', '--porcelain', '-uno'];
114 const { stdout } = await execAsyncPiped('git', execArgs, { cwd });
115 if (stdout.length && !skipChecks) {
116 throw Error('Working tree has uncommitted changes, please commit or remove the following changes before continuing.');
117 }
118}

Callers 1

release.mjsFile · 0.90

Calls 1

execAsyncPipedFunction · 0.90

Tested by

no test coverage detected