Get the currently checked out branch.
(git: GitClient)
| 111 | |
| 112 | /** Get the currently checked out branch. */ |
| 113 | function 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. */ |
| 122 | function getCurrentGitUser(git: GitClient) { |