From: Simeon Krastnikov <skrastnikov@gmail.com>
To: git@vger.kernel.org
Subject: Potential bug in --color-words output
Date: Fri, 28 Oct 2022 23:08:09 +0200 [thread overview]
Message-ID: <e2164b04-98de-6f19-6c33-6979c1a328ff@gmail.com> (raw)
Hello,
Given an initial file with the contents "not to be", which I then change
to "to be", the output of 'git diff --color-words', is
notto be
with the first three letters colored red. To me this seems incorrect as
it implies, or at least misleadingly suggests, that there was no space
between "not" and "to" in the original file. (Even though in that case
the output is actually "nottoto be" with the "notto" in red and "to" in
green.)
If instead I start with a file with contents "to be", which I then
change to "not to be", then the output is as expected:
not to be
(First three letters colored green.)
Am I correct in seeing this as a bug? If so, any tips on what parts of
diff.c to look at when starting a patch?
Thanks,
Simeon
next reply other threads:[~2022-10-28 21:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-28 21:08 Simeon Krastnikov [this message]
[not found] ` <198be0ca-4768-d3ce-caf3-bce4b1bb1e49@gmail.com>
2022-11-07 23:23 ` Potential bug in --color-words output Stefan Beller
2022-11-08 7:27 ` Johannes Sixt
2022-11-10 13:51 ` Johannes Schindelin
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=e2164b04-98de-6f19-6c33-6979c1a328ff@gmail.com \
--to=skrastnikov@gmail.com \
--cc=git@vger.kernel.org \
/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).