Centralize Git identity environment construction

This commit is contained in:
Ian Gulliver
2026-10-21 11:12:54 -07:00
parent 9d0ffb5723
commit ae4cc5d57b
12 changed files with 23 additions and 69 deletions
+1 -6
View File
@@ -155,12 +155,7 @@ func (m *Manager) takeSnapshot(ctx context.Context, t snapTarget, trigger api.Sn
}
n := last.N + 1
commit, err := git.CommitSnapshot(t.dir, tree, git.SnapshotRef(t.taskID, n), fmt.Sprintf("byre snapshot %d (%s)", n, trigger), []string{
"GIT_AUTHOR_NAME=" + t.gitName,
"GIT_AUTHOR_EMAIL=" + t.gitEmail,
"GIT_COMMITTER_NAME=" + t.gitName,
"GIT_COMMITTER_EMAIL=" + t.gitEmail,
})
commit, err := git.CommitSnapshot(t.dir, tree, git.SnapshotRef(t.taskID, n), fmt.Sprintf("byre snapshot %d (%s)", n, trigger), git.IdentityEnv(t.gitName, t.gitEmail))
if err != nil {
return nil, err
}