]> git.ipfire.org Git - thirdparty/git.git/commit - diff.c
diff: fix regression with --stat and unmerged file
authorPeter Grayson <pete@jpgrayson.net>
Wed, 14 Dec 2022 17:41:51 +0000 (12:41 -0500)
committerJunio C Hamano <gitster@pobox.com>
Thu, 15 Dec 2022 00:12:04 +0000 (09:12 +0900)
commit209d9cb0114dff72e96d58bb3c27409660f1b45c
tree3485c675b867aa08c6841f58200570fc1c931871
parent12fc4ad89e23af642a8614371ff80bc67cb3315d
diff: fix regression with --stat and unmerged file

A regression was introduced in

  12fc4ad89e (diff.c: use utf8_strwidth() to count display width, 2022-09-14)

that causes missing newlines after "Unmerged" entries in `git diff
--cached --stat` output.

This problem affects v2.39.0-rc0 through v2.39.0.

Add the missing newline along with a new test to cover this
behavior.

Signed-off-by: Peter Grayson <pete@jpgrayson.net>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff.c
t/t4046-diff-unmerged.sh