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

Method allChangesFilesSince

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

Retrieve a list of all files in the repository changed since the provided shaOrRef.

(shaOrRef = 'HEAD')

Source from the content-addressed store, hash-verified

198 isShallowRepo(): boolean {
199 return this.run(['rev-parse', '--is-shallow-repository']).stdout.trim() === 'true';
200 }
201
202 /** Gets the currently checked out branch or revision. */
203 getCurrentBranchOrRevision(): string {
204 const branchName = this.run(['rev-parse', '--abbrev-ref', 'HEAD']).stdout.trim();
205 // If no branch name could be resolved. i.e. `HEAD` has been returned, then Git
206 // is currently in a detached state. In those cases, we just want to return the
207 // currently checked out revision/SHA.
208 if (branchName === 'HEAD') {
209 return this.run(['rev-parse', 'HEAD']).stdout.trim();
210 }
211 return branchName;

Callers 2

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

Calls 3

runGracefulMethod · 0.95
assertValidGitRefFunction · 0.85
gitOutputAsArrayFunction · 0.85

Tested by

no test coverage detected