Retrieve a list of all files in the repository changed since the provided shaOrRef.
(shaOrRef = 'HEAD')
| 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; |
no test coverage detected