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

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

From
Thomas Rast <trast@student.ethz.ch>
Date
May 18, 2011, 07:33 UTC
Message-ID
<201105180933.16650.trast@student.ethz.ch>
In-Reply-To
<20110518055411.GA27482@sigill.intra.peff.net>
Jeff King wrote:
Show 13 quoted lines
> On Tue, May 17, 2011 at 10:03:03PM -0700, Junio C Hamano wrote:
> 
> > 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.
> 
> I'm not that concerned about these type of destructive operations, which
> might waste a few seconds or a minute of your time. But Thomas' original
> email indicated he was using "git checkout -p", which _is_ destructive
> in a much bigger way, because a "y" overwrites worktree files which do
> not otherwise have a backup (even "reset -p" leaves unreferenced blobs
> that used to be in the index).

Indeed. I wouldn't be complaining if I typed "a" or "y", but 'checkout -p' trashed all my changes to a file because it treated the up-arrow as an "a". We should not accidentally "bind" things to extra keys, much less dangerous ones. The fact that up-arrow is ^[[A is an implementation detail.

-- 
Thomas Rast
trast@{inf,student}.ethz.ch
Previous: Jeff King
Message 6 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.