Re: [PATCH v2 1/3] repo-settings: create core.featureAdoptionRate setting
- From
Carlo Arenas <carenas@gmail.com>
- Date
- Jun 30, 2019, 18:35 UTC
- Message-ID
- <CAPUEspg8neAfmKUV3U2DWPnDHOawcbGMNNm_n1MCD7KtLNymLQ@mail.gmail.com>
- In-Reply-To
- <e684ad41-ca93-bad5-cf39-9dcf578a04ae@gmail.com>
On Fri, Jun 28, 2019 at 6:44 PM Derrick Stolee <stolee@gmail.com> wrote:
Show 9 quoted lines
> > On 6/28/2019 5:42 PM, Junio C Hamano wrote: > > "Derrick Stolee via GitGitGadget" <gitgitgadget@gmail.com> writes: > > > > Use of "signed char" would be OK, but this is a singleton instance > > per repository, so I am not sure how much it matters to save a few > > words here by not using the most natural "int" type. > > I'll use 'int' in v2.
FWIW, this broke the build in (at least) Linux AArch64, unless the following is applied on top of ds/early-access
Carlo -- >8 -- Subject: [PATCH] repo-settings: explicitly make flags using char as signed
used as a three state boolean and therefore could also be set/compared with -1, which will break in architectures that use unsigned char by default (ex: ARM)
Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com> --- repo-settings.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/repo-settings.h b/repo-settings.h index b50228f992..544873fff4 100644 --- a/repo-settings.h +++ b/repo-settings.h @@ -2,9 +2,9 @@ #define REPO_SETTINGS_H struct repo_settings { - char core_commit_graph; - char gc_write_commit_graph; - char pack_use_sparse; + signed char core_commit_graph; + signed char gc_write_commit_graph; + signed char pack_use_sparse; int index_version; };
-- 2.22.0