MCPcopy Index your code
hub / github.com/changesets/changesets / getCurrentCommitId

Function getCurrentCommitId

packages/git/src/index.ts:296–312  ·  view source on GitHub ↗
({
  cwd,
  short = false,
}: {
  cwd: string;
  short?: boolean;
})

Source from the content-addressed store, hash-verified

294}
295
296export async function getCurrentCommitId({
297 cwd,
298 short = false,
299}: {
300 cwd: string;
301 short?: boolean;
302}): Promise<string> {
303 return (
304 await spawn(
305 "git",
306 ["rev-parse", short && "--short", "HEAD"].filter<string>(Boolean as any),
307 { cwd }
308 )
309 ).stdout
310 .toString()
311 .trim();
312}
313
314export async function remoteTagExists(tagStr: string) {
315 const gitCmd = await spawn("git", [

Callers 3

versionFunction · 0.90
index.test.tsFile · 0.85
addFileAndCommitFunction · 0.85

Calls

no outgoing calls

Tested by 1

addFileAndCommitFunction · 0.68