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

Re: [PATCH] Add `restore.defaultLocation` option

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 12, 2023, 21:32 UTC
Message-ID
<xmqqfsa9y7t5.fsf@gitster.g>
In-Reply-To
<pull.1467.git.git.1678578153640.gitgitgadget@gmail.com>
"Hugo Sales via GitGitGadget" <gitgitgadget@gmail.com> writes:
> From: Hugo Sales <hugo@hsal.es>
>
> This options allows control over which of `--worktree` or `--staged` is
> applied when `git restore` is invoked with neither

We do not want to do this. Tutorials and documents will be written assuming the official default, and those users who set it to use a different default, only because they are told to use it before they know better, would waste a lot of time wondering why the procedures they read from tutorials and documents would not work for them. Even an expert who is asked to help a novice, who has this variable set, would end up getting confused becaue "git restore" without the explict options does not work as they expect.

Individual users are welcome to use "[alias] ri = restore --staged" and this will hurt nobody.

Previous: Hugo Sales via GitGitGadgetNext: Junio C Hamano
Message 2 of 6 in “Add `restore.defaultLocation` option”
  1. Add `restore.defaultLocation` optionHugo Sales via GitGitGadget, Mar 11, 2023
  2. Junio C HamanoMar 12, 2023
  3. Junio C HamanoMar 13, 2023
  4. Junio C HamanoMar 13, 2023
  5. Hugo SalesMar 14, 2023
  6. Hugo SalesMar 26, 2023

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.