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

Function getCurrentAbbrevSha

ng-dev/release/stamping/env-stamp.ts:95–101  ·  view source on GitHub ↗

Get the current abbreviated SHA of HEAD.

(git: GitClient)

Source from the content-addressed store, hash-verified

93
94/** Get the current abbreviated SHA of HEAD. */
95function getCurrentAbbrevSha(git: GitClient) {
96 try {
97 return git.run(['rev-parse', '--short', 'HEAD']).stdout.trim();
98 } catch {
99 return '';
100 }
101}
102
103/** Get the current branch or revision of HEAD. */
104function getCurrentBranchOrRevision(git: GitClient) {

Callers 1

printEnvStampFunction · 0.85

Calls 1

runMethod · 0.45

Tested by

no test coverage detected