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

Re: Support for an interactive confirmation prompt when users can possibly lose their work like some UNIX commands

From
Jeff King <peff@peff.net>
Date
Aug 28, 2019, 15:05 UTC
Message-ID
<20190828150530.GD14432@sigill.intra.peff.net>
In-Reply-To
<664344cb-f9e4-d4fc-fd14-620e3e10157a@disroot.org>
On Tue, Aug 27, 2019 at 10:42:03PM +0000, Vipul wrote:
Show 11 quoted lines
> Jeff King wrote:
> > The usual philosophy in Git is not to bother the user with
> > confirmations, but to allow recovery after a mistake.
> > 
> 
> Well, always prompting for confirmation will be annoying for some people
> specially who are mastered in git but, may be very useful feature for
> beginner's to avoid them from making mistakes. May be, this feature will
> be disabled by default and users have to set some config variable (like
> other git-config variable for example help.autocorrect etc) in global
> gitconfig file.

Sure, I think there's an argument to be made for confirmations (though I personally would not want them). I was just describing what Git has now.

Show 8 quoted lines
> > Note that there _are_ some commands which are not reversible: mostly
> > things that drop content from the working tree. So "git reset --hard" is
> > one, and "git clean" is another. There have been discussions and even
> > some patches about storing the lost in an "undo log", but nothing has
> > been merged.
> >
> Seems like a good idea. Are they ever gonna merge? If no, why? Or, it
> will merge in next feature release.

I don't know the latest state. A quick search of the archive showed this as the latest version:

  https://public-inbox.org/git/20181209104419.12639-1-pclouds@gmail.com/
-Peff
Previous: VipulNext: Duy Nguyen
Message 4 of 6 in “Support for an interactive confirmation prompt when users can possibly lose their work like some UNIX commands”
  1. VipulAug 27, 2019
  2. Jeff KingAug 27, 2019
  3. VipulAug 27, 2019
  4. Jeff KingAug 28, 2019
  5. Duy NguyenAug 28, 2019
  6. Pratyush YadavAug 27, 2019

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.