mirror of
https://code.forgejo.org/actions/checkout
synced 2025-04-28 11:34:25 +08:00
updated other version-specific logic
This commit is contained in:
parent
06abf5564e
commit
64dbc8124d
4 changed files with 6 additions and 21 deletions
|
@ -111,16 +111,7 @@ class GitCommandManager {
|
|||
|
||||
async branchList(remote: boolean): Promise<string[]> {
|
||||
const result: string[] = []
|
||||
|
||||
// Note, this implementation uses "rev-parse --symbolic-full-name" because the output from
|
||||
// "branch --list" is more difficult when in a detached HEAD state.
|
||||
|
||||
// TODO(https://github.com/actions/checkout/issues/786): this implementation uses
|
||||
// "rev-parse --symbolic-full-name" because there is a bug
|
||||
// in Git 2.18 that causes "rev-parse --symbolic" to output symbolic full names. When
|
||||
// 2.18 is no longer supported, we can switch back to --symbolic.
|
||||
|
||||
const args = ['rev-parse', '--symbolic-full-name']
|
||||
const args = ['rev-parse', '--symbolic']
|
||||
if (remote) {
|
||||
args.push('--remotes=origin')
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue