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

Function getCurrentBranch

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

Get the currently checked out branch.

(git: GitClient)

Source from the content-addressed store, hash-verified

111
112/** Get the currently checked out branch. */
113function getCurrentBranch(git: GitClient) {
114 try {
115 return git.run(['symbolic-ref', '--short', 'HEAD']).stdout.trim();
116 } catch {
117 return '';
118 }
119}
120
121/** Get the current git user based on the git config. */
122function getCurrentGitUser(git: GitClient) {

Callers 1

printEnvStampFunction · 0.85

Calls 1

runMethod · 0.45

Tested by

no test coverage detected