-
-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Description
Description:
The current switchToMaybeExistingBranch
method determines branch checkout success by parsing git checkout
command's stderr output. However, since Git client messages vary by system language locale, in non-English environments (e.g., Chinese, Japanese), the stderr.includes()
string matching may fail, causing:
- False triggering of
git checkout -b
to recreate existing branches - Potential error:
fatal: a branch named 'xxx' already exists
Reproduction Steps:
- Set OS/Git language to non-English (e.g.,
export LANG=zh_CN.UTF-8
) - Call
switchToMaybeExistingBranch
with an existing branch name - Observe
git checkout -b
being incorrectly triggered with error
Affected Code:
https://github.com/un-ts/changesets-gitlab/blob/main/src/git-utils.ts#L37-L48
Environment:
- OS: All localization-supported systems
- Git Versions: All versions affected
Metadata
Metadata
Assignees
Labels
No labels