git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vipul <finn02@disroot.org>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org
Subject: Re: Support for an interactive confirmation prompt when users can possibly lose their work like some UNIX commands
Date: Tue, 27 Aug 2019 22:42:03 +0000	[thread overview]
Message-ID: <664344cb-f9e4-d4fc-fd14-620e3e10157a@disroot.org> (raw)
In-Reply-To: <20190827190509.GB3150@sigill.intra.peff.net>


[-- Attachment #1.1: Type: text/plain, Size: 1433 bytes --]

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.

> If you've moved a branch pointer around (e.g., via "git branch -f" or
> "git reset"), you can recover it from the reflog.
> 

Recovery is not a problem, asking for help on #git IRC people will tell
you whether data is recoverable. If recoverable, they will even guide
you step-by-step. But, I think it would be good idea to not make these
kind of mistakes at first place. Ultimately, we as a developer want to
make software more user-friendly and usable for normal users.

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


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2019-08-27 22:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-27  9:53 Support for an interactive confirmation prompt when users can possibly lose their work like some UNIX commands Vipul
2019-08-27 19:05 ` Jeff King
2019-08-27 22:42   ` Vipul [this message]
2019-08-28 15:05     ` Jeff King
2019-08-28 15:27       ` Duy Nguyen
2019-08-27 22:22 ` Pratyush Yadav

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=664344cb-f9e4-d4fc-fd14-620e3e10157a@disroot.org \
    --to=finn02@disroot.org \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    /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).