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`)
|
- macOS:`osxkeychain` → 回退 `store`(`~/.git-credentials`)
|
||||||
- Linux:`libsecret` → 回退 `store`
|
- Linux:`libsecret` → 回退 `store`
|
||||||
- 平台扩展(可选):`git/.gitconfig.darwin` / `.gitconfig.linux` 仅在高版本 Git 下通过 includeIf 加载
|
- 平台扩展(可选):`git/.gitconfig.darwin` / `.gitconfig.linux` 仅在高版本 Git 下通过 includeIf 加载
|
||||||
|
- `help.autocorrect`:主配置为 `0`(兼容旧 Git);Git ≥ 2.36 的平台文件里为 `prompt`
|
||||||
|
|
||||||
## 边界(不要做的事)
|
## 边界(不要做的事)
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -54,7 +54,8 @@
|
|||||||
enabled = true
|
enabled = true
|
||||||
autoupdate = true
|
autoupdate = true
|
||||||
[help]
|
[help]
|
||||||
autocorrect = prompt
|
# 旧版 Git 仅支持数字(0=仅提示不执行)。Git 2.36+ 见 .gitconfig.darwin / .gitconfig.linux 可改为 prompt
|
||||||
|
autocorrect = 0
|
||||||
[branch]
|
[branch]
|
||||||
autoSetupMerge = always
|
autoSetupMerge = always
|
||||||
sort = -committerdate
|
sort = -committerdate
|
||||||
|
|||||||
@@ -1,2 +1,3 @@
|
|||||||
# macOS 专用 Git 配置(可选扩展;凭据见主配置 git-credential.sh)
|
# macOS 专用(需 Git 2.36+ includeIf ondarwin)
|
||||||
# 需要 Git 2.36+ 的 includeIf ondarwin 才会加载本文件
|
[help]
|
||||||
|
autocorrect = prompt
|
||||||
|
|||||||
@@ -1,2 +1,3 @@
|
|||||||
# Linux 专用 Git 配置(可选扩展;凭据见主配置 git-credential.sh)
|
# Linux 专用(需 Git 2.36+ includeIf onlinux)
|
||||||
# 需要 Git 2.36+ 的 includeIf onlinux 才会加载本文件
|
[help]
|
||||||
|
autocorrect = prompt
|
||||||
|
|||||||
Reference in New Issue
Block a user