From: Han-Wen Nienhuys <hanwen@google.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Han-Wen Nienhuys via GitGitGadget <gitgitgadget@gmail.com>,
git@vger.kernel.org, Han-Wen Nienhuys <hanwenn@gmail.com>
Subject: Re: [PATCH] refs.h: make all flags arguments unsigned
Date: Tue, 1 Feb 2022 12:47:11 +0100 [thread overview]
Message-ID: <CAFQ2z_PtNsrSXdCG_5vr99Fz63GDMpC6j7rzLqOn+cZufi+xfQ@mail.gmail.com> (raw)
In-Reply-To: <xmqqa6fbgx85.fsf@gitster.g>
On Tue, Feb 1, 2022 at 3:02 AM Junio C Hamano <gitster@pobox.com> wrote:
>
> "Han-Wen Nienhuys via GitGitGadget" <gitgitgadget@gmail.com> writes:
>
> > From: Han-Wen Nienhuys <hanwen@google.com>
> >
> > As discussed in
> > https://lore.kernel.org/git/xmqqbkzrkevo.fsf@gitster.g/ , we don't
> > want to treat the sign bit specially, so make all flags in refs.h
> > unsigned.
>
> It may be true that we do not want to, but are we sure there is no
> code that already uses some cleverness to make the topmost bit
> special by e.g. doing ugly things like "if (flags < 0)" ;-)?
In refs.h, we don't have any bitmasks that accept 32 different bit
values, so it's hard to see how we would stumble into a case like
that.
> I haven't had energy to vet the entire codebase for all flag words
> and that is why I've never produced a patch like this one myself.
>
> Thanks for carefully vetting after creating this (presumably
> mechanically prepared) patch---producing is the easy part, but
> making sure it does not break unexpectedly is much harder.
I went over the changes once more, uniformizing the naming. I didn't
see any shenanigans.
--
Han-Wen Nienhuys - Google Munich
I work 80%. Don't expect answers from me on Fridays.
--
Google Germany GmbH, Erika-Mann-Strasse 33, 80636 Munich
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschäftsführer: Paul Manicle, Halimah DeLaine Prado
next prev parent reply other threads:[~2022-02-01 11:47 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-31 20:15 [PATCH] refs.h: make all flags arguments unsigned Han-Wen Nienhuys via GitGitGadget
2022-02-01 2:02 ` Junio C Hamano
2022-02-01 11:47 ` Han-Wen Nienhuys [this message]
2022-02-01 18:41 ` Junio C Hamano
2022-02-01 12:46 ` [PATCH v2] " Han-Wen Nienhuys via GitGitGadget
2022-02-01 20:20 ` Ævar Arnfjörð Bjarmason
2022-02-01 23:03 ` Junio C Hamano
2022-02-03 14:29 ` Han-Wen Nienhuys
2022-02-03 17:53 ` Ævar Arnfjörð Bjarmason
2022-02-03 18:16 ` Han-Wen Nienhuys
2022-02-03 21:20 ` Ævar Arnfjörð Bjarmason
2022-02-03 18:27 ` Junio C Hamano
2022-02-03 18:33 ` Han-Wen Nienhuys
2022-02-03 19:15 ` Junio C Hamano
2022-02-03 14:26 ` [PATCH v3 0/2] " Han-Wen Nienhuys via GitGitGadget
2022-02-03 14:26 ` [PATCH v3 1/2] " Han-Wen Nienhuys via GitGitGadget
2022-02-03 14:26 ` [PATCH v3 2/2] Uniformize flag argument naming to `flags` or `unused_flags` Han-Wen Nienhuys via GitGitGadget
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAFQ2z_PtNsrSXdCG_5vr99Fz63GDMpC6j7rzLqOn+cZufi+xfQ@mail.gmail.com \
--to=hanwen@google.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=gitster@pobox.com \
--cc=hanwenn@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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).