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

Re: [PATCH] Add an "-i" option to git-reset, to confirm a reset.

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 16, 2007, 20:09 UTC
Message-ID
<7vwsrejta3.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<94ccbe710712151946u22f02a8fkbc3c4cbc96ee22f5@mail.gmail.com>
"Kelvie Wong" <kelvie@ieee.org> writes:
Show 6 quoted lines
> On Dec 15, 2007 7:35 PM, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> ..
>> I am slightly negative on this patch.  Not only do I think that it is both
>> easier and more natural to run diff/status/an-alias to see what a reset
>> would do, but the patch only handles the index_file part (missing the --
>> <file> part AFAICT).

I am in principle very negative on additional option that does the same thing as what the users on odd occasions can run a separate command themselves to achieve, and I think "reset -i" falls into that category.

And I am negative on this "-i" not just because I think that would be only in "odd occasions" (i.e. rare), but because I think it would not help much. Either you are sure about resetting, in which case you would not even use "-i" option (and not get this safety), or you are unsure, in which case you can do "git status" or whatever commands that are already available.

> w.r.t. the style, you were referring to just the array initializers
> right?  Or was there something else I did that doesn't look right?
I spotted only two classes.

+ + /* Show the user what is about to be reset, and in more detail, if they + * like. */

	/*
         * Show the user what is about to be reset, and in more detail,
         * if they like.
         */
+	if(confirm_reset) {
	if (confirm_reset) {
Previous: Kelvie WongNext: Kelvie Wong
Message 4 of 5 in “Add an "-i" option to git-reset, to confirm a reset.”
  1. Add an "-i" option to git-reset, to confirm a reset.Kelvie Wong, Dec 16, 2007
  2. Johannes SchindelinDec 16, 2007
  3. Kelvie WongDec 16, 2007
  4. Junio C HamanoDec 16, 2007
  5. Kelvie WongDec 16, 2007

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.