fix: make help.autocorrect compatible with old Git versions
Use numeric 0 in main config so legacy Git does not fail on parse; keep prompt in platform includes for Git 2.36+. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -65,6 +65,7 @@ ff reload # 重载 fish 配置
|
||||
- macOS:`osxkeychain` → 回退 `store`(`~/.git-credentials`)
|
||||
- Linux:`libsecret` → 回退 `store`
|
||||
- 平台扩展(可选):`git/.gitconfig.darwin` / `.gitconfig.linux` 仅在高版本 Git 下通过 includeIf 加载
|
||||
- `help.autocorrect`:主配置为 `0`(兼容旧 Git);Git ≥ 2.36 的平台文件里为 `prompt`
|
||||
|
||||
## 边界(不要做的事)
|
||||
|
||||
|
||||
+2
-1
@@ -54,7 +54,8 @@
|
||||
enabled = true
|
||||
autoupdate = true
|
||||
[help]
|
||||
autocorrect = prompt
|
||||
# 旧版 Git 仅支持数字(0=仅提示不执行)。Git 2.36+ 见 .gitconfig.darwin / .gitconfig.linux 可改为 prompt
|
||||
autocorrect = 0
|
||||
[branch]
|
||||
autoSetupMerge = always
|
||||
sort = -committerdate
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
# macOS 专用 Git 配置(可选扩展;凭据见主配置 git-credential.sh)
|
||||
# 需要 Git 2.36+ 的 includeIf ondarwin 才会加载本文件
|
||||
# macOS 专用(需 Git 2.36+ includeIf ondarwin)
|
||||
[help]
|
||||
autocorrect = prompt
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
# Linux 专用 Git 配置(可选扩展;凭据见主配置 git-credential.sh)
|
||||
# 需要 Git 2.36+ 的 includeIf onlinux 才会加载本文件
|
||||
# Linux 专用(需 Git 2.36+ includeIf onlinux)
|
||||
[help]
|
||||
autocorrect = prompt
|
||||
|
||||
Reference in New Issue
Block a user