Skip to content

Commit

Permalink
fix: when parsing git commands internally use english (non-english c…
Browse files Browse the repository at this point in the history
…ompatibility)

fixes #47
  • Loading branch information
chriswalz committed Oct 30, 2020
1 parent 010a868 commit 38c77e1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,10 @@ Thanks to [Gitless](https://gitless.com/), [git-extras](https://github.com/tj/gi
- https://blog.csdn.net/a419240016/article/details/109178001

## Changelog
v0.9
- [X] enhancement: improve bit sync behavior including `bit sync <upstream> <branch>`
- [X] enhancement: bit sync provides a rebase option for diverged branches`
- [X] fix: enable compatibility with non-english languages
v0.8
- [X] feature: checkout Pull Requests from github (requires `gh pr list` to work)
- [X] enhancement: install with homebrew: `brew install bit-git`
Expand Down
6 changes: 5 additions & 1 deletion cmd/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,5 +201,9 @@ func tagCurrentBranch(version string) error {

func execCommand(name string, arg ...string) *exec.Cmd {
log.Debug().Msg(name + " " + strings.Join(arg, " "))
return exec.Command(name, arg...)
c := exec.Command(name, arg...)
// exec commands are parsed by bit without getting printed.
// parsing assumes english
c.Env = append(c.Env, "LANG=C")
return c
}

0 comments on commit 38c77e1

Please sign in to comment.