summaryrefslogtreecommitdiff
path: root/builtin/receive-pack.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-03-17 00:53:09 (GMT)
committerJunio C Hamano <gitster@pobox.com>2022-03-17 00:53:09 (GMT)
commit38bbb9e990e7290c286ad0a8ea250ab53470a374 (patch)
tree9643b7ecc0a51c01ade32df122f5d7e1d70d3aff /builtin/receive-pack.c
parent7431379a9c5ed4006603114b1991c6c6e98d5dca (diff)
parent99d60545f87445d7050999b826fc4cd49e69376c (diff)
downloadgit-38bbb9e990e7290c286ad0a8ea250ab53470a374.zip
git-38bbb9e990e7290c286ad0a8ea250ab53470a374.tar.gz
git-38bbb9e990e7290c286ad0a8ea250ab53470a374.tar.bz2
Merge branch 'ab/string-list-count-in-size-t'
Count string_list items in size_t, not "unsigned int". * ab/string-list-count-in-size-t: string-list API: change "nr" and "alloc" to "size_t" gettext API users: don't explicitly cast ngettext()'s "n"
Diffstat (limited to 'builtin/receive-pack.c')
-rw-r--r--builtin/receive-pack.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
index 6d6a8bb..9aabffa 100644
--- a/builtin/receive-pack.c
+++ b/builtin/receive-pack.c
@@ -813,13 +813,14 @@ static int run_and_feed_hook(const char *hook_name, feed_fn feed,
proc.trace2_hook_name = hook_name;
if (feed_state->push_options) {
- int i;
+ size_t i;
for (i = 0; i < feed_state->push_options->nr; i++)
strvec_pushf(&proc.env_array,
- "GIT_PUSH_OPTION_%d=%s", i,
+ "GIT_PUSH_OPTION_%"PRIuMAX"=%s",
+ (uintmax_t)i,
feed_state->push_options->items[i].string);
- strvec_pushf(&proc.env_array, "GIT_PUSH_OPTION_COUNT=%d",
- feed_state->push_options->nr);
+ strvec_pushf(&proc.env_array, "GIT_PUSH_OPTION_COUNT=%"PRIuMAX"",
+ (uintmax_t)feed_state->push_options->nr);
} else
strvec_pushf(&proc.env_array, "GIT_PUSH_OPTION_COUNT");