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 -1
View File
@@ -136,7 +136,7 @@ func RewriteNotes(repo string, rewrite func(string) string) error {
return err
}
name, email, _ := strings.Cut(who, "\n")
env := []string{"GIT_AUTHOR_NAME=" + name, "GIT_AUTHOR_EMAIL=" + email, "GIT_COMMITTER_NAME=" + name, "GIT_COMMITTER_EMAIL=" + email}
env := IdentityEnv(name, email)
commit, err := runEnv(repo, env, "commit-tree", "-p", parent, "-m", "Rewrite byre ids in notes", tree)
if err != nil {
return err