git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Harald Nordgren via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org,  Harald Nordgren <haraldnordgren@gmail.com>
Subject: Re: [PATCH] diff: add --no-indicators option
Date: Fri, 19 Dec 2025 20:58:03 +0900	[thread overview]
Message-ID: <xmqq8qeywuno.fsf@gitster.g> (raw)
In-Reply-To: <pull.2133.git.git.1766132264231.gitgitgadget@gmail.com> (Harald Nordgren via GitGitGadget's message of "Fri, 19 Dec 2025 08:17:44 +0000")

"Harald Nordgren via GitGitGadget" <gitgitgadget@gmail.com> writes:

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

  parent reply	other threads:[~2025-12-19 11:58 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-19  8:17 [PATCH] diff: add --no-indicators option Harald Nordgren via GitGitGadget
2025-12-19  8:57 ` Collin Funk
2025-12-19 11:48   ` Harald Nordgren
2025-12-19 13:28     ` Ben Knoble
2025-12-19 18:53       ` Harald Nordgren
2025-12-19 10:33 ` Phillip Wood
2025-12-19 11:46   ` Harald Nordgren
2025-12-19 14:27     ` Phillip Wood
2025-12-19 14:40       ` Chris Torek
2025-12-19 14:54         ` Harald Nordgren
2025-12-19 15:02           ` Chris Torek
2025-12-19 15:23             ` Harald Nordgren
2025-12-19 14:50       ` Harald Nordgren
2025-12-20 13:14         ` Johannes Sixt
2025-12-19 11:58 ` Junio C Hamano [this message]
2025-12-19 19:08   ` Harald Nordgren
2025-12-20  6:03     ` Junio C Hamano
2025-12-20 10:52       ` Harald Nordgren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqq8qeywuno.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=haraldnordgren@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).