diff options
| author | Harald Nordgren <haraldnordgren@gmail.com> | 2026-06-02 18:43:28 +0000 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-06-03 08:39:54 +0900 |
| commit | 03c29e2e980da7595cbade29e02616d2de2c42f8 (patch) | |
| tree | 207a52a72446dab62beea1a3c8c68b62077c9a2c /contrib/persistent-https | |
| parent | 9b03e2790af03bebc9bc084cfc921492e6d5ca70 (diff) | |
config: improve diagnostic for "set" with missing value
"git config set pull.rebase=false" currently fails with "wrong
number of arguments", and the implicit form "git config
pull.rebase=false" fails with "invalid key". Neither points at
the real problem: the value is missing.
Report that directly, and when the argument has the shape
"<valid-key>=<value>", also suggest the split form:
$ git config set pull.rebase=false
error: missing value to set to the variable 'pull.rebase=false'
hint: did you mean "git config set pull.rebase false"?
When the prefix before "=" is not a valid key, drop the hint:
$ git config set foo=bar
error: missing value to set to a variable with an invalid name 'foo=bar'
Signed-off-by: Harald Nordgren <haraldnordgren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/persistent-https')
0 files changed, 0 insertions, 0 deletions
