MCPcopy Create free account
hub / github.com/angular/dev-infra / hasCommit

Method hasCommit

ng-dev/utils/git/git-client.ts:144–148  ·  view source on GitHub ↗

Whether the given branch contains the specified SHA.

(branchName: string, sha: string)

Source from the content-addressed store, hash-verified

142
143 /** Whether the given branch contains the specified SHA. */
144 hasCommit(branchName: string, sha: string): boolean {
145 assertValidGitRef(branchName);
146 assertValidGitRef(sha);
147 return this.run(['branch', branchName, '--contains', sha]).stdout !== '';
148 }
149
150 /** Whether the local repository is configured as shallow. */
151 isShallowRepo(): boolean {

Callers 2

git-client.spec.tsFile · 0.80
checkFunction · 0.80

Calls 2

runMethod · 0.95
assertValidGitRefFunction · 0.85

Tested by

no test coverage detected