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

Re: [PATCH] advice: suggest using subcommand "git config set"

From
Justin Tobler <jltobler@gmail.com>
Date
Dec 4, 2024, 17:19 UTC
Message-ID
<fsqe37ibvarrsjugc4r2cairndr37cmyc64jneaqzhkq4qiiqd@6rskou37aqat>
In-Reply-To
<20241204130928.1059851-1-bence@ferdinandy.com>
On 24/12/04 02:08PM, Bence Ferdinandy wrote:
> The advice message currently suggests using "git config advice..." to
> disable advice messages, but since 00bbdde141f we have the "set"

When referencing an existing commit, I think there is a preference to use the output of:

  $ git show -s --format=reference 00bbdde141f
  00bbdde141 (builtin/config: introduce "set" subcommand, 2024-05-06)
> subcommand for config. Change the disable advice message to use the
> subcommand instead. Change all uses of "git config advice" in the tests
> to use the subcommand.

Both "git config <config> <value>" and "git config set <config> <value>" are functionally the same operation. So the motivation for this seems to be to push/promote usage of the new "set" subcommand. I find the newer interface to be more intuitive and in line with modern command interfaces so updating the advice turn off messages here seems reasonable to me.

There does appear to be other instances where the the advice turn off instructions are open-coded and thus retain the prior format. This does result in some inconsistency, which may not be a big deal, but maybe it would make sense to also adjust those sites as part of this series as also. Otherwise the changes in this patch look correct.

-Justin
Previous: Bence FerdinandyNext: Bence Ferdinandy
Message 2 of 16 in “advice: suggest using subcommand "git config set"”
  1. advice: suggest using subcommand "git config set"Bence Ferdinandy, Dec 4, 2024
  2. Justin ToblerDec 4, 2024
  3. Bence FerdinandyDec 5, 2024
  4. Patrick SteinhardtDec 5, 2024
  5. advice: suggest using subcommand "git config set"Bence Ferdinandy, Dec 5, 2024
  6. Patrick SteinhardtDec 6, 2024
  7. Rubén JustoDec 8, 2024
  8. 1/3 advice: enhance `detach_advice()` to `detach_advice_if_enabled()`Rubén Justo, Dec 8, 2024
  9. 2/3 commit: use `advise_if_enabled()` in `read_graft_file()`Rubén Justo, Dec 8, 2024
  10. 3/3 object-name: advice to avoid refs that resemble hashesRubén Justo, Dec 8, 2024
  11. Bence FerdinandyDec 9, 2024
  12. Bence FerdinandyDec 9, 2024
  13. Rubén JustoDec 9, 2024
  14. Bence FerdinandyDec 11, 2024
  15. Rubén JustoDec 11, 2024
  16. Junio C HamanoDec 6, 2024

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.