git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[bug report] erroneous suggestion for "--add" option in `git config set` error message

From
PWPaul Wintz <pwintz@ucsc.edu>
Date
Nov 20, 2025, 23:39 UTC
Message-ID
<CADBJ995pDG9R8EJnK5nwWKPWAf-XF5P5KTY+bAx71EhdMvvO6A@mail.gmail.com>

It seems that there is an erroneous suggestion in a `git config set` error message when setting a value that already has multiple values. The error message says to use the `--add` option, but this option does not seem to exist. The `--append` option should be suggested instead.

Steps to reproduce:
1. Create a configuration with multiple values:
    git config set --global test.test 'hello'
    git config set --global --append test.test 'hi'
2. Try to set the value of `test.test`:
    git config set --global test.test 'hi'
An error message is shown:
    warning: test.test has multiple values
    error: cannot overwrite multiple values with a single value
           Use a regexp, --add or --replace-all to change test.test.
3. Following the direction to use `--add` produces an error:
    > git config set --add test.test "aloha"
    error: unknown option `add'
The error message should say `--append` instead of `--add`.

[System Info] git version: git version 2.48.1 cpu: x86_64 no commit associated with this build sizeof-long: 8 sizeof-size_t: 8 shell-path: /bin/sh libcurl: 8.12.1 zlib: 1.3.1 uname: Linux 6.14.0-35-generic #35-Ubuntu SMP PREEMPT_DYNAMIC Sat Oct 11 10:06:31 UTC 2025 x86_64 compiler info: gnuc: 14.2 libc info: glibc: 2.41 $SHELL (typically, interactive shell): /bin/bash

[Enabled Hooks] post-checkout post-commit post-merge pre-push

-- Paul Wintz, PhD UCSC Hybrid Systems Laboratory Hartnell College, Adjunct Faculty PaulWintz.com

Next: René Scharfe
Message 1 of 3 in “[bug report] erroneous suggestion for "--add" option in `git config set` error message”
  1. Paul WintzNov 20, 2025
  2. René ScharfeNov 24, 2025
  3. config: fix suggestion for failed set of multi-valued optionRené Scharfe, Nov 24, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.