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

Re: [BUG] git config --unset is not idempotent

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 25, 2022, 16:25 UTC
Message-ID
<xmqqk06w2sui.fsf@gitster.g>
In-Reply-To
<CAHckPJS6ibtxbU+VKwDaU6pFMtJ5SMcWnBi6D2pY+ekqpWsqXg@mail.gmail.com>
Arturo Seijas Fernandez <arturo.seijas@canonical.com> writes:
> The command "git config --unset [option]" is not idempotent. It is
> currently returning a success  code when the property had already been
> set and a 5 error code otherwise.
"rm" is not "idempotent", either.
    echo >file
    rm file ; echo $?
    rm file ; echo $?

The "git config --unset" command signals the inability to unset a variable when the variable to be unset does not even exist.

Previous: Jeff King
Message 3 of 3 in “[BUG] git config --unset is not idempotent”
  1. Arturo Seijas FernandezAug 25, 2022
  2. Jeff KingAug 25, 2022
  3. Junio C HamanoAug 25, 2022

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.