From: Junio C Hamano <gitster@pobox.com>
To: Michael J Gruber <git@drmicha.warpmail.net>
Cc: Jeff King <peff@peff.net>, Pete Harlan <pgit@pcharlan.com>,
Hermann Gausterer <git-mailinglist@mrq1.org>,
git list <git@vger.kernel.org>
Subject: Re: [PATCH] add-interactive: shortcut to add hunk and quit
Date: Wed, 18 May 2011 08:28:57 -0700 [thread overview]
Message-ID: <7vr57wc9ja.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <4DD390AF.9020705@drmicha.warpmail.net> (Michael J. Gruber's message of "Wed, 18 May 2011 11:26:07 +0200")
Michael J Gruber <git@drmicha.warpmail.net> writes:
>> We could also allow multiple commands at once, like "yq" (even in
>> single-key mode, this would do the same thing).
>
> So instead of having to
>
> press y press q
>
> I can now
>
> hold SHIFT press q
>
> Seeing the gain in that fails me completely. Also, why doesn't "yd"
> deserve a shortcut? I would expect that to be used more often, as in:
> "Yes, that was the hunk I wanted to add from this file, but what other
> files have changes"?
Thanks, I agree that "Q" as proposed is not very useful and looks too much
like a hack that caters to one special user from that point of view.
I've also been wondering why nobody has asked for "5y", which I often find
lacking.
When you have a set of changes with many hunks to sift through, before
going into an "add -p" session, you often have pretty good idea of hunks
in which part of the files are to go to the commit you are currently
building. I often find myself saying "ah, from here there are many hunks I
want, and it is totally safe for me to apply 5 or so from here without
looking."
I think "single-key" was a poorly designed attempt to improve productivity
the ("y" <RET>)*5 into "y"*5, while sacrificing the safety net when you
are trying to pick and decide one by one (like the accident Thomas had
recently during "checkout -p"). If I can say "5y", think for half a second
to make sure I typed what I meant, and <RET>, to apply 5 upcoming hunks in
one go, I think I would be as efficient as the productivity optimization
the single-key offers, while still protecting me from mistakes made by fat
fingers.
next prev parent reply other threads:[~2011-05-18 15:29 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-15 12:55 [PATCH] add-interactive: shortcut for add hunk and quit Hermann Gausterer
2011-05-15 20:30 ` Junio C Hamano
2011-05-16 16:26 ` [PATCH] add-interactive: shortcut to " Hermann Gausterer
2011-05-16 16:37 ` Matthieu Moy
2011-05-17 5:09 ` Junio C Hamano
2011-05-17 7:12 ` Hermann Gausterer
2011-05-18 6:40 ` Pete Harlan
2011-05-18 6:45 ` Jeff King
2011-05-18 9:26 ` Michael J Gruber
2011-05-18 15:28 ` Junio C Hamano [this message]
2011-05-19 10:16 ` Thomas Rast
2011-05-19 11:02 ` Jeff King
2011-05-19 19:25 ` Junio C Hamano
2011-05-19 19:42 ` Jeff King
2011-05-18 8:43 ` Hermann Gausterer
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=7vr57wc9ja.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git-mailinglist@mrq1.org \
--cc=git@drmicha.warpmail.net \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
--cc=pgit@pcharlan.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 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).