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

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

 



On Tue, May 17, 2011 at 10:03:03PM -0700, Junio C Hamano wrote:

> 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.

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).

-Peff
--
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]