From: "Hardik Kumar" <hardikxk@gmail.com>
To: "Junio C Hamano" <gitster@pobox.com>,
"Hardik Kumar" <hardikxk@gmail.com>
Cc: <git@vger.kernel.org>, <l.s.r@web.de>, <pabloosabaterr@gmail.com>
Subject: Re: [PATCH v2] utf8: use size_t for string width methods and callee sites.
Date: Mon, 27 Jul 2026 12:12:55 +0530 [thread overview]
Message-ID: <DK95E6MN2LYU.3P2KB11V2SAS7@gmail.com> (raw)
In-Reply-To: <xmqqbjbtqdv4.fsf@gitster.g>
On Mon Jul 27, 2026 at 9:32 AM IST, Junio C Hamano wrote:
> Junio C Hamano <gitster@pobox.com> writes:
>
> Quite honestly, I have to say that this topic has a very low
> expected benefit in practice, while it costs us quite a lot by
> having to carefully code and even more carefully review. If we have
> to endure so many new bugs in the callers just to clear an existing
> TODO, we might be better off not doing so and relying on the "safe
> cast from size_t down to int that barfs if the quantity does not fit
> in an int" protection.
I agree that while this might not net something significant and yes
going through this is difficult but, many places it would much rather
make sense having an unsigned int as mostly its rare that we would be
dealing with negatives except in a few cases which you highlighted
before and others I got when reworking.
I would like to send up a patch with some better changes done. I had
previously not built and tested with warnings enabled apologies for
that I assumed the defaults to enable them without explicit args.
Thanks,
Hardik
next prev parent reply other threads:[~2026-07-27 6:43 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-26 12:34 [PATCH] change utf8_strwidth() return type to size_t Hardik Kumar
2026-07-26 13:41 ` René Scharfe
2026-07-26 15:50 ` Hardik Kumar
2026-07-26 14:52 ` Pablo Sabater
2026-07-26 15:52 ` Hardik Kumar
2026-07-26 19:57 ` [PATCH v2] utf8: use size_t for string width methods and callee sites Hardik Kumar
2026-07-27 0:06 ` Junio C Hamano
2026-07-27 4:02 ` Junio C Hamano
2026-07-27 6:42 ` Hardik Kumar [this message]
2026-07-27 1:06 ` Pablo Sabater
2026-07-27 6:40 ` Hardik Kumar
2026-07-27 6:59 ` [PATCH v3] utf8: make utf8_strwidth() and utf8_strnwidth() return size_t Hardik Kumar
2026-07-27 7:04 ` Hardik Kumar
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=DK95E6MN2LYU.3P2KB11V2SAS7@gmail.com \
--to=hardikxk@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=l.s.r@web.de \
--cc=pabloosabaterr@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.