aboutsummaryrefslogtreecommitdiffstats
path: root/builtin
diff options
context:
space:
mode:
authorEugenio Gigante <giganteeugenio2@gmail.com>2024-02-29 20:44:44 +0100
committerJunio C Hamano <gitster@pobox.com>2024-02-29 11:52:42 -0800
commit322320445630570539f7b55f376e3431f49c8405 (patch)
tree65109831c27cf8a6c8ad0c63bda42c8b9741ee0d /builtin
parent0d464a4e6a5a19bd8fbea1deae22d48d14dccb01 (diff)
downloadgit-322320445630570539f7b55f376e3431f49c8405.tar.gz
add: use unsigned type for collection of bits
The 'refresh' function in 'builtin/add.c' declares 'flags' as signed, and passes it as an argument to the 'refresh_index' function, which though expects an unsigned value. Since in this case 'flags' represents a bag of bits, whose MSB is not used in special ways, change the type of 'flags' to unsigned. Signed-off-by: Eugenio Gigante <giganteeugenio2@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/add.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/add.c b/builtin/add.c
index 2151c45fbf..012d151252 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);