Re: [PATCH] log --format: document %w

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



René Scharfe <rene.scharfe@xxxxxxxxxxxxxx> writes:

> I think utf8_width() is too generic for that; we shouldn't teach it terminal
> control details.

I agree that the function whose purpose is to compute display width should
not be called utf8_width().

The outside caller of utf8_width() in diff.c uses it to truncate the
function name hint on the hunk header line at character boundary.  The
input shouldn't have color escapes _we_ add (it might contain such
sequences from the user data, though), so I agree that we shouldn't
contaminate this function with color escapes.

> strbuf_add_wrapped_text(); ignoring display mode escape codes in there can be
> justified with its purpose.

Surely, and thanks.  The patch looks good.

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]