Re: [PATCH] add-interactive: shortcut to add hunk and quit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Michael J Gruber <git@xxxxxxxxxxxxxxxxxxxx> 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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]