0
0
mirror of https://github.com/thegeeklab/wp-git-action.git synced 2024-06-02 18:29:41 +02:00
wp-git-action/git/config.go

30 lines
411 B
Go
Raw Normal View History

2022-11-27 14:33:39 +01:00
package git
2019-06-07 12:32:16 +02:00
import (
"os/exec"
)
// GlobalUser sets the global git author email.
func GlobalUser(email string) *exec.Cmd {
cmd := exec.Command(
"git",
"config",
"--global",
"user.email",
email)
return cmd
}
// GlobalName sets the global git author name.
func GlobalName(author string) *exec.Cmd {
cmd := exec.Command(
"git",
"config",
"--global",
"user.name",
author)
return cmd
}