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
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/git-auth-helper.ts11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/git-auth-helper.ts b/src/git-auth-helper.ts
index a1950a6..e67db14 100644
--- a/src/git-auth-helper.ts
+++ b/src/git-auth-helper.ts
@@ -374,6 +374,10 @@ class GitAuthHelper {
const hostIncludeKey = `includeIf.gitdir:${gitDir}.path`
await this.git.config(hostIncludeKey, credentialsConfigPath)
+ // Configure host includeIf for worktrees
+ const hostWorktreeIncludeKey = `includeIf.gitdir:${gitDir}/worktrees/*.path`
+ await this.git.config(hostWorktreeIncludeKey, credentialsConfigPath)
+
// Container git directory
const workingDirectory = this.git.getWorkingDirectory()
const githubWorkspace = process.env['GITHUB_WORKSPACE']
@@ -395,6 +399,13 @@ class GitAuthHelper {
// Configure container includeIf
const containerIncludeKey = `includeIf.gitdir:${containerGitDir}.path`
await this.git.config(containerIncludeKey, containerCredentialsPath)
+
+ // Configure container includeIf for worktrees
+ const containerWorktreeIncludeKey = `includeIf.gitdir:${containerGitDir}/worktrees/*.path`
+ await this.git.config(
+ containerWorktreeIncludeKey,
+ containerCredentialsPath
+ )
}
}