Re: [PATCH] diff: add --no-indicators option
- From
Chris Torek <chris.torek@gmail.com>
- Date
- Dec 19, 2025, 14:40 UTC
- Message-ID
- <CAPx1GvdNQbHY0avQ_Gt4bkLiuNHPW80E0v1vxrwyQYDD=zpc0g@mail.gmail.com>
- In-Reply-To
- <f141e335-9729-4f09-86b2-12a39f24837a@gmail.com>
On Fri, Dec 19, 2025 at 6:27 AM Phillip Wood <phillip.wood123@gmail.com> wrote:
Show 6 quoted lines
> If you want to restore some lines from a previous version of the file > then it would be worth trying out "git restore -p" as Ben suggested. If > there is some other use for this then it would be helpful to understand > a bit more about it. I'm struggling to see why it would be useful to be > able to copy and paste a mixture of insertions and deletions without the > '+' and '-' indicators. ...
As someone who makes a lot of tpyos and hsa text that gets duplicaged because of copypasta duplicaged because of copypasta errors and on on (ahem), my personal preference tends towards:
$ git show <rev1>:<path> > file.oldver
$ git show <rev2>:<path> > file.newver
$ vim file file.oldver file.newverand then cut/paste old or new parts in the editor, rather than with a mouse that doesn't always get the proper edge points. The ability to "git show" specific versions of files is the key here.
(The patch modes of git add/restore are good for small things.)
Chris