From: Han-Wen Nienhuys <hanwen@google.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>,
Han-Wen Nienhuys via GitGitGadget <gitgitgadget@gmail.com>,
git@vger.kernel.org, Han-Wen Nienhuys <hanwenn@gmail.com>
Subject: Re: [PATCH v2] refs.h: make all flags arguments unsigned
Date: Thu, 3 Feb 2022 19:16:04 +0100 [thread overview]
Message-ID: <CAFQ2z_NWM0F1uY==rCrc2pvJYjgPyOHz5aLFLSng-DvgiQVxqw@mail.gmail.com> (raw)
In-Reply-To: <220203.8635kz6d2o.gmgdl@evledraar.gmail.com>
On Thu, Feb 3, 2022 at 7:05 PM Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:
> > I proposed both options because a distinct typename lets me jump to
> > the definition of the flags easily through ctags.
>
> I'm not sure I understand you here. I use ctags (via Emacs) and it's
"I proposed both options" (ie. enum or typedef) , so we are in
resounding agreement.
> > Another idea is to mark the type of the flags by its name, eg.
> > transaction_flags, resolve_flags, reftype_flags etc. This wouldn't
> > help with ctags, but it does help with readability.
>
> Yes, enums or not, what I was also pointing out in
> https://lore.kernel.org/git/220201.86ilty9vq2.gmgdl@evledraar.gmail.com/
> is that changing just one logical set of flags at a time would make this
> much easier to review.
>
> It doesn't matter for the end result as long as we end up with "unsigned
> int" everywhere, but would with enums.
Not sure if you need to review it in that detail. If you change a
definition in the .h file, the compiler will complain about all
mismatches. So it doesn't need human verification once you know it
compiles.
--
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-03 18:16 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
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 [this message]
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_NWM0F1uY==rCrc2pvJYjgPyOHz5aLFLSng-DvgiQVxqw@mail.gmail.com' \
--to=hanwen@google.com \
--cc=avarab@gmail.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).