All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Matthieu Moy <Matthieu.Moy@imag.fr>
Cc: git@vger.kernel.org, Jeff King <peff@peff.net>
Subject: Re: [RFC PATCH] git add -p: new "quit" command at the prompt.
Date: Wed, 15 Apr 2009 16:25:55 -0700	[thread overview]
Message-ID: <7v7i1lqz24.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: vpqtz4rynhp.fsf@bauges.imag.fr

Matthieu Moy <Matthieu.Moy@imag.fr> writes:

> I think everybody agree that the intention of the patch is good (well,
> several pro, and no real counter-argument).

Oh, I think we have already passed that state long time ago.  It's queued
as c9cc8d9 ([NEEDS SIGN OFF, DOC, AND REVIEW] git add -p: new "quit"
command at the prompt., 2009-04-10) in 'pu'.

I agree that there is a "Huh?" factor in the repeated and similar hunks to
patch_update_file, but the first hunk is dealing with the mode change and
the second one is about the patch text.

Currently parse_diff_header() returns the mode line into $mode and the
main loop treats $mode differently from @hunk, which is an array of hunks
parsed by parse_diff().  Treating $mode as a "fake hunk" by unshifting it
at the beginning of @hunk array and teaching the main loop minor details
such as $mode "fake hunk" cannot be edited nor split, I suspect we _could_
unify the two.

ca72468 (add--interactive: allow user to choose mode update, 2008-03-27)
introduced this duplication.  Jeff, what do you think?  I am not sure if
it is worth it.

  reply	other threads:[~2009-04-15 23:27 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-10 14:57 [RFC PATCH] git add -p: new "quit" command at the prompt Matthieu Moy
2009-04-11 19:22 ` Junio C Hamano
2009-04-12 12:45   ` Matthieu Moy
2009-04-12 12:54     ` Sverre Rabbelier
2009-04-13  1:39       ` Miles Bader
2009-04-12 17:29     ` [RFC PATCH] " Nicolas Sebrecht
2009-04-13 16:38     ` [RFC PATCH] " Wincent Colaiuta
2009-04-14 20:44     ` Matthieu Moy
2009-04-15 23:25       ` Junio C Hamano [this message]
2009-04-16  6:00         ` Jeff King
2009-04-16  6:52           ` Jeff King
2009-04-16  7:14             ` Jeff King
2009-04-16 16:44               ` Matthieu Moy
2009-04-16 16:46                 ` [PATCH 1/2] " Matthieu Moy
2009-04-16 16:46                   ` [PATCH 2/2] Update git-add.txt according to the new possibilities of 'git add -p' Matthieu Moy

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=7v7i1lqz24.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=Matthieu.Moy@imag.fr \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.