[PATCH v4] sideband.c: remove redundant 'NEEDSWORK' tag
From: Chandra Pratap via GitGitGadget <hidden>
Date: 2023-12-28 08:01:04
Subsystem:
the rest · Maintainer:
Linus Torvalds
From: Chandra Pratap <redacted>
Signed-off-by: Chandra Pratap <redacted>
---
sideband.c: replace int with size_t for clarity
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1625%2FChand-ra%2Fdusra-v4
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1625/Chand-ra/dusra-v4
Pull-Request: https://github.com/gitgitgadget/git/pull/1625
Range-diff vs v3:
1: 273415aa6a4 ! 1: 8c003256e5b sideband.c: remove redundant 'NEEDSWORK' tag
@@ sideband.c: void list_config_color_sideband_slots(struct string_list *list, cons
*
- * NEEDSWORK: use "size_t n" instead for clarity.
+ * It is fine to use "int n" here instead of "size_t n" as all calls to this
-+ * function pass an 'int' parameter.
++ * function pass an 'int' parameter. Additionally, the buffer involved in
++ * storing these 'int' values takes input from a packet via the pkt-line
++ * interface, which is capable of transferring only 64kB at a time.
*/
static void maybe_colorize_sideband(struct strbuf *dest, const char *src, int n)
{
sideband.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/sideband.c b/sideband.c
index 6cbfd391c47..266a67342be 100644
--- a/sideband.c
+++ b/sideband.c@@ -69,7 +69,10 @@ void list_config_color_sideband_slots(struct string_list *list, const char *pref * of the line. This should be called for a single line only, which is * passed as the first N characters of the SRC array. * - * NEEDSWORK: use "size_t n" instead for clarity. + * It is fine to use "int n" here instead of "size_t n" as all calls to this + * function pass an 'int' parameter. Additionally, the buffer involved in + * storing these 'int' values takes input from a packet via the pkt-line + * interface, which is capable of transferring only 64kB at a time. */ static void maybe_colorize_sideband(struct strbuf *dest, const char *src, int n) {
base-commit: 1a87c842ece327d03d08096395969aca5e0a6996 -- gitgitgadget