From: Junio C Hamano <gitster@pobox.com>
To: "Hugo Sales via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, Hugo Sales <hugo@hsal.es>
Subject: Re: [PATCH] Add `restore.defaultLocation` option
Date: Mon, 13 Mar 2023 11:02:32 -0700 [thread overview]
Message-ID: <xmqqfsa8v8av.fsf@gitster.g> (raw)
In-Reply-To: <xmqqfsa9y7t5.fsf@gitster.g> (Junio C. Hamano's message of "Sun, 12 Mar 2023 14:32:38 -0700")
Junio C Hamano <gitster@pobox.com> writes:
> "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, ...
Well, I think this change is no different from any other
configuration option and it may be OK.
My initial reaction primarily came from the fact that the choice
between the index and the working tree is so fundamental aspect of
the behaviour of the command that people who wrote their script
would be relying on it not to change. But given that the command is
still marked as experimental, as long as the new behaviour is
clearly documented to warn those who care *not* to rely on the
default behaviour and tell them to instead always give explicitly
these "--worktree" and/or "--staged" options, it would be OK.
This actually is a more important tangent, but if you think the
command invites mistakes from users who forget to give "--staged",
it may indicate that the command is too overloaded, and the UI might
be improved by removing the feature from this command and instead
encouraging people to use "git reset" to futz with the contents of
the index. I dunno.
next prev parent reply other threads:[~2023-03-13 18:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-11 23:42 [PATCH] Add `restore.defaultLocation` option Hugo Sales via GitGitGadget
2023-03-12 21:32 ` Junio C Hamano
2023-03-13 18:02 ` Junio C Hamano [this message]
2023-03-13 23:11 ` Junio C Hamano
2023-03-14 23:51 ` Hugo Sales
2023-03-26 10:53 ` Hugo Sales
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqfsa8v8av.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=hugo@hsal.es \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).