From: Eugenio Gigante <giganteeugenio2@gmail.com>
To: git@vger.kernel.org
Cc: sunshine@sunshineco.com, gitster@pobox.com,
Eugenio Gigante <giganteeugenio2@gmail.com>
Subject: [GSoC][PATCH 1/1] add: use unsigned type for collection of bits
Date: Sat, 24 Feb 2024 12:26:38 +0100 [thread overview]
Message-ID: <20240224112638.72257-2-giganteeugenio2@gmail.com> (raw)
In-Reply-To: <20240224112638.72257-1-giganteeugenio2@gmail.com>
The function 'refresh' in 'builtin/add.c' declares 'flags' as signed,
while the function 'refresh_index' defined in 'read-cache-ll.h' expects an unsigned value.
Since in this case 'flags' represents a bag of bits, whose MSB is not used in special ways,
this commit changes the type of 'flags' to unsigned.
Signed-off-by: Eugenio Gigante <giganteeugenio2@gmail.com>
---
builtin/add.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/add.c b/builtin/add.c
index ada7719561..393c10cbcf 100644
--- a/builtin/add.c
+++ b/builtin/add.c
@@ -115,7 +115,7 @@ static int refresh(int verbose, const struct pathspec *pathspec)
int i, ret = 0;
char *skip_worktree_seen = NULL;
struct string_list only_match_skip_worktree = STRING_LIST_INIT_NODUP;
- int flags = REFRESH_IGNORE_SKIP_WORKTREE |
+ unsigned int flags = REFRESH_IGNORE_SKIP_WORKTREE |
(verbose ? REFRESH_IN_PORCELAIN : REFRESH_QUIET);
seen = xcalloc(pathspec->nr, 1);
--
2.43.0
next prev parent reply other threads:[~2024-02-24 11:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-24 11:26 [GSoC][PATCH 0/1] Use unsigned integral type for collection of bits Eugenio Gigante
2024-02-24 11:26 ` Eugenio Gigante [this message]
2024-02-26 9:59 ` [GSoC][PATCH 1/1] add: use unsigned " Christian Couder
2024-02-26 22:58 ` Junio C Hamano
2024-02-29 19:44 ` [GSoC][PATCH v2 0/1] Use unsigned integral " Eugenio Gigante
2024-02-29 19:44 ` [PATCH v2 1/1] add: use unsigned " Eugenio Gigante
2024-02-29 19:52 ` Junio C Hamano
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240224112638.72257-2-giganteeugenio2@gmail.com \
--to=giganteeugenio2@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=sunshine@sunshineco.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.
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 NNTP newsgroup(s).