Re: [PATCH v3 10/10] xdiff: treat xdfile_t.rchg like an enum
- From
Ezekiel Newren <ezekielnewren@gmail.com>
- Date
- Sep 21, 2025, 16:11 UTC
- Message-ID
- <CAH=ZcbAEho12zWy4fTis0hjUa8+wXm=WwHNG0Dj-Fd0GBvoe7g@mail.gmail.com>
- In-Reply-To
- <c8a35919-e1d1-4d85-b7d7-81923667af60@gmail.com>
On Sun, Sep 21, 2025 at 3:19 AM Phillip Wood <phillip.wood123@gmail.com> wrote:
Show 5 quoted lines
> > What if I move NO, YES, MAYBE into xprepare.c and refactor `char rchg` > > to `bool changed`? > > That would be good as it avoids the possibility of using MAYBE outside > of xprepare.c
Ok, I'll do that.
Show 9 quoted lines
> > The problem with bool is that C needs to include > > stdbool.h to match how Rust defines bool. git-compat-util.h didn't > > include it, then it did, then it didn't because compat/posix.h > > included it instead. > > 75a044f748f (git-compat-util.h: split out POSIX-emulating bits, > 2025-02-18) moved '#include <stdbool.h>' from "git-compat-util.h" into > "compat/posix.h" but also added '#include "compat/posix.h"' to > "git-compat-util.h" so there should be no problem.
Oh, I missed that when I was reading through git-compat-util.h. I just searched for `stdbool.h` and saw that it was in compat/posix.h instead of git-compat-util.h.