Commit edcd66f
fix(remote): reject option-shaped update targets
<!-- agent -->
`Remote.update()` also crosses an internal Git command boundary: Git's
`remote update` parses options, then forwards the remaining operands to
`fetch --multiple` without an option terminator. A leading-dash remote
name can therefore change the requested operation or its target set.
Reject such names before dispatch. Document at `_call_process()` why
high-level wrappers must protect operands, while the low-level runner
must continue supporting deliberately positional options. Shell quoting
does not affect Git's own option parsing. Add an unreleased changelog entry.
Git reference: `builtin/remote.c:update()` at Git commit
`12cb6293d6288865c1a133cf22accbaf99d13eb6` constructs the internal fetch
command without preserving `--`.
Assisted-by: GPT 6.0
Co-authored-by: GPT 6.0 <codex@openai.com>1 parent 0d8d845 commit edcd66f
3 files changed
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1795 | 1795 | | |
1796 | 1796 | | |
1797 | 1797 | | |
| 1798 | + | |
| 1799 | + | |
| 1800 | + | |
| 1801 | + | |
| 1802 | + | |
| 1803 | + | |
1798 | 1804 | | |
1799 | 1805 | | |
1800 | 1806 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
871 | 871 | | |
872 | 872 | | |
873 | 873 | | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
874 | 877 | | |
875 | 878 | | |
876 | 879 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
0 commit comments