Re: [PATCH] Add an "-i" option to git-reset, to confirm a reset.
- From
- Kelvie Wong <kelvie@ieee.org>
- Date
- Dec 16, 2007, 21:26 UTC
- Message-ID
- <94ccbe710712161326q7360d910ld9442e73630d46af@mail.gmail.com>
- In-Reply-To
- <7vwsrejta3.fsf@gitster.siamese.dyndns.org>
On Dec 16, 2007 12:09 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 38 quoted lines
> "Kelvie Wong" <kelvie@ieee.org> writes:
>
> > 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) {
>I guess this is just for people like me who are used to the "M-x vc-revert" function in emacs, which shows you exactly what changes get reverted before doing so.
But I guess it is quite trivial to make an alias to do the same when invoking git-reset (or checkout) directly.
-- Kelvie Wong