Read-only mirror — the public repositories of the Forgejo instance, refreshed every 10 minutes. The live instance (fg.dieschoenewolke.de) is reachable only over the VPN; clone here with https://git.dieschoenewolke.de/git/<owner>/<repo>.git.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Wesley Walker III <81404201+jww3@users.noreply.github.com>2024-03-12 16:25:38 +0000
committerJohn Wesley Walker III <81404201+jww3@users.noreply.github.com>2024-03-12 16:25:38 +0000
commitc84834fc33f798a5abb52bfbe8fcca44bf2fb135 (patch)
tree875140d7749634434ff591ebfc2c0907a85f15a8
parent3f2ac68787b636cd84ca3d2cd710454795b96c54 (diff)
updated other version-specific logic
-rw-r--r--README.md2
-rw-r--r--__test__/git-command-manager.test.ts6
-rw-r--r--dist/index.js8
-rw-r--r--src/git-command-manager.ts11
4 files changed, 6 insertions, 21 deletions
diff --git a/README.md b/README.md
index bfecf46..2858d46 100644
--- a/README.md
+++ b/README.md
@@ -8,7 +8,7 @@ Only a single commit is fetched by default, for the ref/SHA that triggered the w
The auth token is persisted in the local git config. This enables your scripts to run authenticated git commands. The token is removed during post-job cleanup. Set `persist-credentials: false` to opt-out.
-When Git 2.18 or higher is not in your PATH, falls back to the REST API to download the files.
+When Git 2.25 or higher is not in your PATH, falls back to the REST API to download the files.
# What's new
diff --git a/__test__/git-command-manager.test.ts b/__test__/git-command-manager.test.ts
index cea73d4..fcffe04 100644
--- a/__test__/git-command-manager.test.ts
+++ b/__test__/git-command-manager.test.ts
@@ -24,7 +24,7 @@ describe('git-auth-helper tests', () => {
console.log(args, options.listeners.stdout)
if (args.includes('version')) {
- options.listeners.stdout(Buffer.from('2.18'))
+ options.listeners.stdout(Buffer.from('2.25'))
return 0
}
@@ -57,7 +57,7 @@ describe('git-auth-helper tests', () => {
console.log(args, options.listeners.stdout)
if (args.includes('version')) {
- options.listeners.stdout(Buffer.from('2.18'))
+ options.listeners.stdout(Buffer.from('2.25'))
return 0
}
@@ -97,7 +97,7 @@ describe('Test fetchDepth and fetchTags options', () => {
console.log(args, options.listeners.stdout)
if (args.includes('version')) {
- options.listeners.stdout(Buffer.from('2.18'))
+ options.listeners.stdout(Buffer.from('2.25'))
}
return 0
diff --git a/dist/index.js b/dist/index.js
index d66b9a7..42e0297 100644
--- a/dist/index.js
+++ b/dist/index.js
@@ -524,13 +524,7 @@ class GitCommandManager {
branchList(remote) {
return __awaiter(this, void 0, void 0, function* () {
const result = [];
- // 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');
}
diff --git a/src/git-command-manager.ts b/src/git-command-manager.ts
index 0adc732..38783e9 100644
--- a/src/git-command-manager.ts
+++ b/src/git-command-manager.ts
@@ -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 {