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.