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
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Dec 16, 2007, 03:35 UTC
Message-ID
<Pine.LNX.4.64.0712160332140.27959@racer.site>
In-Reply-To
<1197775596-14329-1-git-send-email-kelvie@ieee.org>
Hi,
On Sat, 15 Dec 2007, Kelvie Wong wrote:
Show 9 quoted lines
> It shows a diffstat, and asks the user if they would like to continue, 
> or show a full diff of the things getting reset.
> 
> I know that many times, I do a reset --hard thinking I had commited a 
> file already, but it turns out that I hadn't; and so this makes sure I 
> don't lose any work when the caffeine wears off.
> 
> Maybe it should also be made that only hard resets take this option, as 
> I cannot see this being useful in other places.

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).

Besides, the code style is incompatible with the surrounding code.

Ciao, Dscho

Previous: Kelvie WongNext: Kelvie Wong
Message 2 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.