git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2] refs.h: make all flags arguments unsigned

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 1, 2022, 23:03 UTC
Message-ID
<xmqq8ruub35i.fsf@gitster.g>
In-Reply-To
<220201.86ilty9vq2.gmgdl@evledraar.gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
> The post-image LGTM, but I'm also a bit "meh" on the churn just for
> signed->unsigned, especially given the conflict with my in-flight
> ab/no-errno-from-resolve-ref-unsafe. But it's not too bad, and if Junio
> hasn't complained about it...

I won't complain myself. I'd still try to help newer developers, but my intention is to make it the responsibility for individual developers to make sure their topic works well with topics in flight ;-)

Between "enum" and #define that is stored in "unsigned", neither gives us much type safety in C; "enum" may be somewhat worse by giving a false sense of having a type safety that does not really exist, than "unsigned int" that is more honestly defeats such a false sense of safety. So I have no strong preference either way.

Previous: Ævar Arnfjörð BjarmasonNext: Han-Wen Nienhuys
Message 7 of 17 in “refs.h: make all flags arguments unsigned”
  1. refs.h: make all flags arguments unsignedHan-Wen Nienhuys via GitGitGadget, Jan 31, 2022
  2. Junio C HamanoFeb 1, 2022
  3. Han-Wen NienhuysFeb 1, 2022
  4. Junio C HamanoFeb 1, 2022
  5. refs.h: make all flags arguments unsignedHan-Wen Nienhuys via GitGitGadget, Feb 1, 2022
  6. Ævar Arnfjörð BjarmasonFeb 1, 2022
  7. Junio C HamanoFeb 1, 2022
  8. Han-Wen NienhuysFeb 3, 2022
  9. Ævar Arnfjörð BjarmasonFeb 3, 2022
  10. Han-Wen NienhuysFeb 3, 2022
  11. Ævar Arnfjörð BjarmasonFeb 3, 2022
  12. Junio C HamanoFeb 3, 2022
  13. Han-Wen NienhuysFeb 3, 2022
  14. Junio C HamanoFeb 3, 2022
  15. 0/2 refs.h: make all flags arguments unsignedHan-Wen Nienhuys via GitGitGadget, Feb 3, 2022
  16. 1/2 refs.h: make all flags arguments unsignedHan-Wen Nienhuys via GitGitGadget, Feb 3, 2022
  17. 2/2 Uniformize flag argument naming to `flags` or `unused_flags`Han-Wen Nienhuys via GitGitGadget, Feb 3, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.