On Mon, Sep 05, 2022 at 01:46:57PM -0700, Junio C Hamano wrote: > tboegi@xxxxxx writes: > > > From: Torsten Bögershausen <tboegi@xxxxxx> > > Subject: Re: [PATCH v4 1/2] diff.c: When appropriate, use utf8_strwidth(), part1 > > Given 2/2 does not share a similar title, "part1" sounds somewhat > strange. In any case, 'when appropriate,' is probalby best unsaid, > as it is almost a given. We won't deliberately use something that > is not appropriate on purpose anyway. Even if we =were to keep that > word, downcase "When". Yes, agreed. In short: I will make a new patch the next weeks, in one commit (again). (That can take some days or weeks) Thanks to Dscho for his patience with the strbuf() improvements. I think that I tried a "%*s" version, but couldn't get that to work. > > Side note 2: > > Junio C Hamano suspects that there is probably more work to be done, > > in a separate commit: > > Code in diff.c::pprint_rename() that "abbreviates" overly long pathnames > > and "transforms" renames lines like > > "a/b/c -> a/B/c" into the shorter > > "a/{b->B}/c" form, and IIRC this is all byte based. > > I already said that I suspect {b->B} conversion is OK, so the side > note is probably more noise than being useful. OK - the comment can be removed. I didn't know how to read this comment: >...but the former may chomp a single multi-byte letter in the middle, > which would need to be corrected as a part of this change. After diffing into the code some more times, I think that we don't chomp a single byte out of an UTF-8 sequence.