From: Matthieu Moy <Matthieu.Moy@imag.fr>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [RFC PATCH] git add -p: new "quit" command at the prompt.
Date: Tue, 14 Apr 2009 22:44:02 +0200 [thread overview]
Message-ID: <vpqtz4rynhp.fsf@bauges.imag.fr> (raw)
In-Reply-To: <vpqfxgevy58.fsf@bauges.imag.fr> (Matthieu Moy's message of "Sun\, 12 Apr 2009 14\:45\:23 +0200")
Matthieu Moy <Matthieu.Moy@imag.fr> writes:
> Junio C Hamano <gitster@pobox.com> writes:
>
>> Matthieu Moy <Matthieu.Moy@imag.fr> writes:
>>
>>> There's already 'd' to stop staging hunks in a file, but no command to
>>> stop the interactive staging (for the current files and the remaining
>>> ones). This patch implements this functionality, and binds it to 'q'.
>>> ---
>>>
>>> I'm not familiar at all with the code in git-add--interactive.perl, so
>>> my code is mostly cut-and-pasted+adapted from the 'd' command.
>>
>> You can say 'd' and then ^C, I think.
>
> Yes, you /can/, and that's what I'm doing right now in this situation.
> But that's undocumented, not so intuitive (I found out I could do that
> after trying ^C alone, which doesn't work, staged content is recorded
> on disk at the end of the file only, not after each prompt), ...
>
> I thought the situation was common enough to deserve an explicit
> command. The 'd' command is natural for "git add -i" + patch
> subcommand, but for "git add -p", I found 'd' mostly useless, and I
> really want a "quit" command.
>
> Sure, I can live without it, but if other people would like to have
> it, please speak now ;-).
I think everybody agree that the intention of the patch is good (well,
several pro, and no real counter-argument). I'll send an updated
version with documentation soon, but I'd appreciate review and
comments on the code.
I'm not really happy with the fact that I mainly cut-and-pasted code
from the "d" command, but OTOH, that's already how the code is today
(huge if/elsif/... with similar elsif blocks for each command).
--
Matthieu
next prev parent reply other threads:[~2009-04-14 20:49 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 [this message]
2009-04-15 23:25 ` Junio C Hamano
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=vpqtz4rynhp.fsf@bauges.imag.fr \
--to=matthieu.moy@imag.fr \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/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.