All of lore.kernel.org
 help / color / mirror / Atom feed
* [GSoC PATCH 0/2] diff: handle ANSI chars in prefix when calculating diffstat width
@ 2026-02-24  1:09 LorenzoPegorari
  2026-02-24  1:11 ` [GSoC PATCH 1/2] " LorenzoPegorari
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: LorenzoPegorari @ 2026-02-24  1:09 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano

This patch aims to fix a bug where the calculation of the diffstat width
incorrectly uses the strlen() of line_prefix instead of its actual
display width.

This patch addresses the NEEDSWORK item added by ce8529b2 (diff: leave
NEEDWORK notes in show_stats() function, 2022-10-21).

Also, this bug was reported and suggested to me by Junio C Hamano here:
https://lore.kernel.org/git/xmqqikd3ermt.fsf@gitster.g/

Junio, do you wish to be included in this patch by a Reported-by and/or
Suggested-by tag?

LorenzoPegorari (2):
  diff: handle ANSI chars in prefix when calculating diffstat width
  t4074: add test for diffstat width when prefix contains ANSI chars

 diff.c                                      | 12 ++----
 t/t4074-diff-stat-width-with-line-prefix.sh | 42 +++++++++++++++++++++
 2 files changed, 46 insertions(+), 8 deletions(-)
 create mode 100755 t/t4074-diff-stat-width-with-line-prefix.sh

-- 
2.43.0


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2026-02-27 21:48 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-24  1:09 [GSoC PATCH 0/2] diff: handle ANSI chars in prefix when calculating diffstat width LorenzoPegorari
2026-02-24  1:11 ` [GSoC PATCH 1/2] " LorenzoPegorari
2026-02-24  1:20 ` [GSoC PATCH 2/2] t4074: add test for diffstat width when prefix contains ANSI chars LorenzoPegorari
2026-02-24  5:43   ` Junio C Hamano
2026-02-25  2:18     ` Lorenzo Pegorari
2026-02-24  5:17 ` [GSoC PATCH 0/2] diff: handle ANSI chars in prefix when calculating diffstat width Junio C Hamano
2026-02-27 16:01 ` [GSoC PATCH v2 0/2] diff: handle UTF-8 " LorenzoPegorari
2026-02-27 16:04   ` [GSoC PATCH v2 1/2] " LorenzoPegorari
2026-02-27 16:08   ` [GSoC PATCH v2 2/2] t4052: add test for diffstat width when prefix contains UTF-8 chars LorenzoPegorari
2026-02-27 18:08     ` Junio C Hamano
2026-02-27 18:04   ` [GSoC PATCH v2 0/2] diff: handle UTF-8 chars in prefix when calculating diffstat width Junio C Hamano
2026-02-27 21:43   ` [GSoC PATCH v3 0/2] diff: handle ANSI escape codes " LorenzoPegorari
2026-02-27 21:45     ` [GSoC PATCH v3 1/2] " LorenzoPegorari
2026-02-27 21:48     ` [GSoC PATCH v3 2/2] t4052: test for diffstat width when prefix contains ANSI escape codes LorenzoPegorari

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.