Centralize Git identity environment construction
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user