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

Method get

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

* Static method to get the singleton instance of the `GitClient`, * creating it, if not created yet.

()

Source from the content-addressed store, hash-verified

235 this.runGraceful(['am', '--abort'], {stdio: 'ignore'});
236 // Abort any outstanding cherry-picks.
237 this.runGraceful(['cherry-pick', '--abort'], {stdio: 'ignore'});
238 // Abort any outstanding rebases.
239 this.runGraceful(['rebase', '--abort'], {stdio: 'ignore'});
240 // Clear any changes in the current repo.
241 this.runGraceful(['reset', '--hard'], {stdio: 'ignore'});
242 }
243 return this.runGraceful(['checkout', branchOrRevision], {stdio: 'ignore'}).status === 0;
244 }
245
246 /** Retrieve a list of all files in the repository changed since the provided shaOrRef. */
247 allChangesFilesSince(shaOrRef = 'HEAD'): string[] {
248 assertValidGitRef(shaOrRef);
249 return Array.from(
250 new Set([
251 ...gitOutputAsArray(this.runGraceful(['diff', '--name-only', '--diff-filter=d', shaOrRef])),

Callers 15

validateFileFunction · 0.45
getFunction · 0.45
getCurrentMergeModeFunction · 0.45
setRepoMergeModeFunction · 0.45
g3.spec.tsFile · 0.45
expectBranchRequestMethod · 0.45
getShaForCommitIdMethod · 0.45

Calls 1

getConfigFunction · 0.85