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

Re: [PATCH] add -i: ignore terminal escape sequences

From
Junio C Hamano <gitster@pobox.com>
Date
May 18, 2011, 05:03 UTC
Message-ID
<7vei3weh2w.fsf@alter.siamese.dyndns.org>
In-Reply-To
<BANLkTinSKFVP=VYw4PoLP=-AUbLKeGX+gQ@mail.gmail.com>
Sverre Rabbelier <srabbelier@gmail.com> writes:
Show 7 quoted lines
> On Tue, May 17, 2011 at 20:52, Junio C Hamano <gitster@pobox.com> wrote:
>> Jokes aside, it may make sense to offer an extra confirmation for "a" and
>> possibly "s" in single-key mode. Unlike others, they are destructive when
>> the changes you are splitting from the working tree is large-ish.
>
> I don't understand why/how 's' is destructive? Doesn't it just ask you
> again for each of the split hunks?

I think "add -p" used to have an internal mechanism to merge the adjacent split hunks back to a single hunk, so if we wanted to we could have given users a way to recover from a mistaken "s"plit, but I don't think we kept that code, so there is no way to properly "recover" from such a mistake.

Yes, it may be just the matter of two easy keystrokes, either yy or nn, to recover from such a mistake, and that is why I said "possibly". It is nevertheless destructive in the sense that you cannot recover without quitting the current session and restarting.

Of course Thomas could have simply done "reset" and started from scratch, so in that sense nothing is destructive, but we are not talking about the kind of destructive operations you cannot possibly recover without typing everything again.

Previous: Sverre RabbelierNext: Jeff King
Message 4 of 6 in “add -i: ignore terminal escape sequences”
  1. add -i: ignore terminal escape sequencestrast@student.ethz.ch, May 17, 2011
  2. Junio C HamanoMay 18, 2011
  3. Sverre RabbelierMay 18, 2011
  4. Junio C HamanoMay 18, 2011
  5. Jeff KingMay 18, 2011
  6. Thomas RastMay 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.