public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Adrian Ratiu <adrian.ratiu@collabora•com>
To: Junio C Hamano <gitster@pobox•com>
Cc: git@vger•kernel.org, Patrick Steinhardt <ps@pks•im>
Subject: Re: [PATCH] ws: add new tab-between-non-ws check
Date: Mon, 05 Jan 2026 22:59:51 +0200	[thread overview]
Message-ID: <875x9fai7s.fsf@gentoo.mail-host-address-is-not-set> (raw)
In-Reply-To: <xmqq5x9wpvor.fsf@gitster.g>

On Wed, 24 Dec 2025, Junio C Hamano <gitster@pobox•com> wrote:
> The above is sufficient to make "git diff --check" and "git apply
> --whitespace=warn" notice, but the code change in this patch is not
> sufficient.
>
>  * Colored "git diff" output needs to highlight whitespace errors.
>    diff.c:diff_colors[] tells us to use BG_RED to paint them by
>    default.  At the end of ws_check_emit_1(), when stream is not
>    NULL, we emit the middle segment as-is, but when this new
>    whitespace error class is in effect, that part needs to paint the
>    tab at 7th column between !isspace() bytes.  Introduce a helper
>    function "static emit_middle_section()" to do so, perhaps.
>
>  * "git apply --whitespace=fix" needs to turn such a HT to a SP.
>    This is probably done in ws_fix_copy().
>
> Thanks.

It took me a while, however I now have all functionality working
properly. Just need to cleanup the code a bit, add the extra tests and
will send a v2 very soon.

Thank you for your feedback and patience.

      reply	other threads:[~2026-01-05 21:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-23 13:27 [PATCH] ws: add new tab-between-non-ws check Adrian Ratiu
2025-12-24  0:31 ` Junio C Hamano
2026-01-05 20:59   ` Adrian Ratiu [this message]

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=875x9fai7s.fsf@gentoo.mail-host-address-is-not-set \
    --to=adrian.ratiu@collabora$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=gitster@pobox$(echo .)com \
    --cc=ps@pks$(echo .)im \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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