Re: [PATCH] diff: add --no-indicators option
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 19, 2025, 11:58 UTC
- Message-ID
- <xmqq8qeywuno.fsf@gitster.g>
- In-Reply-To
- <pull.2133.git.git.1766132264231.gitgitgadget@gmail.com>
"Harald Nordgren via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 8 quoted lines
> From: Harald Nordgren <haraldnordgren@gmail.com> > > Add --no-indicators to replace '+', '-', and ' ' indicators in the > left margin with spaces. Colors are preserved, allowing diffs to be > distinguished by color alone. > > This is useful when copy-pasting diff output, as the indicators no > longer need to be manually removed.
If you are cutting more than two lines, then the first column, whether it is '+' or neutered ' ', needs to be removed. And even if you are cutting just one line, you'd still need to deal with the byte in the first column, whether it is '+' or ' ', by either cutting from the second column or removing the first column after pasting.
Also, if your terminal emulator allows cutting from Nth column to the right (e.g., "screen" allows this), it does not matter what the first letter is. You can just say "cut from the 2nd column" and you are done.
So, I am not sure if this is something we want to support. Are there other people's "diff" implementations (like GNU or BSD) that has something like that? If not, it takes a lot more to convince others.