From d687fefab4694865540b68668bf747ff09a8347c Mon Sep 17 00:00:00 2001 From: Jay McCure Date: Mon, 30 Oct 2023 16:20:43 +1000 Subject: [PATCH] fix(mr create): support non-english languages --- pkg/git/git.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/git/git.go b/pkg/git/git.go index 6a879b98..a903aead 100644 --- a/pkg/git/git.go +++ b/pkg/git/git.go @@ -22,6 +22,11 @@ func GetRemoteURL(remoteAlias string) (string, error) { // GetDefaultBranch finds and returns the remote's default branch func GetDefaultBranch(remote string) (string, error) { getDefBranch := exec.Command("git", "remote", "show", remote) + + // Ensure output from git is in English + getDefBranch.Env = os.Environ() + getDefBranch.Env = append(getDefBranch.Env, "LC_ALL=C") + output, err := run.PrepareCmd(getDefBranch).Output() if err != nil { return "master", err