git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <gitster@pobox.com>
Date
May 19, 2011, 19:25 UTC
Message-ID
<7v7h9m7arx.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20110519110259.GA11507@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 13 quoted lines
> On Thu, May 19, 2011 at 12:16:51PM +0200, Thomas Rast wrote:
>
>> Junio C Hamano wrote:
>> > 
>> > I think "single-key" was a poorly designed attempt to improve productivity
>> > the ("y" <RET>)*5 into "y"*5
>> 
>> Actually for me it more often is
>> 
>>   y RET n RET *think* y RET s RET n RET ...
>
> Yeah. I personally find the concept of "5y" crazy; how do you know that
> it is 5, and not 4 or 6, if you haven't yet seen them?

That one is surprisingly easy to answer. Before I decide to use "incremental", I've seen the diff at least once but more often number of times. I know where things are when I start my incremental sessions, and "5" (just an example) is something I would use when I think I know there are 8 or 9, i.e. a number that will surely undershoot but will get me to the end sooner. An alternative would be something akin to "/<pattern>" but that adds, instead of skips.

> I think a confirmation question is a bad idea. It helps with
> fat-fingering, but not much else.

I agree, but fat-fingering is a real problem single-key mode introduces, and that is why I suggested a similar final confirmation only for 'a' in the single-key mode.

Show 5 quoted lines
> I think a much better safety valve is to store the user's worktree state
> that we are about to destroy. Then when they accidentally erase
> something, whether they realize it immediately, or even 5 minutes later,
> it is recoverable. And in the common case where everything goes well,
> they needn't be bothered at all.
Intereting.

Where does the data go (perhaps to "stash create", not "stash save"), and where would we plug that in ("checkout -p" codepath only)?

Previous: Jeff KingNext: Jeff King
Message 13 of 15 in “add-interactive: shortcut for add hunk and quit”
  1. add-interactive: shortcut for add hunk and quitHermann Gausterer, May 15, 2011
  2. Junio C HamanoMay 15, 2011
  3. add-interactive: shortcut to add hunk and quitHermann Gausterer, May 16, 2011
  4. Matthieu MoyMay 16, 2011
  5. Junio C HamanoMay 17, 2011
  6. add-interactive: shortcut to add hunk and quitHermann Gausterer, May 17, 2011
  7. Pete HarlanMay 18, 2011
  8. Jeff KingMay 18, 2011
  9. Michael J GruberMay 18, 2011
  10. Junio C HamanoMay 18, 2011
  11. Thomas RastMay 19, 2011
  12. Jeff KingMay 19, 2011
  13. Junio C HamanoMay 19, 2011
  14. Jeff KingMay 19, 2011
  15. Hermann GaustererMay 18, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.