git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH GSoC v15 02/13] git-compat-util: add `strtoumax_szt()` with error handling

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 1, 2026, 17:30 UTC
Message-ID
<xmqqse62obwh.fsf@gitster.g>
In-Reply-To
<20260701-ps-eric-work-rebase-v15-2-c88a43b63917@gmail.com>
Pablo Sabater <pabloosabaterr@gmail.com> writes:
Show 9 quoted lines
> From: Eric Ju <eric.peijian@gmail.com>
>
> We already have `strtoul_ui()` and similar functions that provide proper
> error handling using `strtoul` from the standard library. However,
> there isn't currently a variant that returns a `size_t`.
>
> Using `strtoul` is unreliable because `size_`t is platform-dependent,
> `unsigned long` could be too big to fit into a `size_t` or too small to
> hold a `size_t`.

It is somehow annoying to see that the commit log desciption, which is *clearly* meant to be plaintext, is so heavily riddled with backquoted references to code/program symbols. Yes, `literal` is a correct way to format them in both AsciiDoc and Markdown, so we very much welcome them in our documentation, but not in proposed log messages.

In any case, you dropped 't' in 'size_t' outside the pair of backquotes.

> Use `strtoumax` which returns a `uintmax_t` guaranteed to be at least as

`strtoumax()`, as the convention you used above for strtoul_ui() is to suffix function names with ().

> large as `size_t`, add a range check against `SIZE_MAX` to prevent
> `size_t` overflow.
OK.
Show 31 quoted lines
> This variant is needed in a subsequent commit to enable returning a
> `size_t` with proper error handling.
>
> Mentored-by: Karthik Nayak <karthik.188@gmail.com>
> Mentored-by: Chandra Pratap <chandrapratap3519@gmail.com>
> Signed-off-by: Pablo Sabater <pabloosabaterr@gmail.com>
> ---
>  git-compat-util.h | 20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)
>
> diff --git a/git-compat-util.h b/git-compat-util.h
> index 8809776407..5ecce5bbd2 100644
> --- a/git-compat-util.h
> +++ b/git-compat-util.h
> @@ -975,6 +975,26 @@ static inline int strtoul_ui(char const *s, int base, unsigned int *result)
>  	return 0;
>  }
>  
> +/*
> + * Convert a string to a size_t using the standard library's strtoumax, with
> + * additional error handling to ensure robustness.
> + */
> +static inline int strtoumax_szt(char const *s, int base, size_t *result)
> +{
> +	uintmax_t uim;
> +	char *p;
> +
> +	errno = 0;
> +	/* negative values would be accepted by strtoul */
> +	if (strchr(s, '-'))
> +		return -1;
Hmph, wouldn't 
	if (*s == '-' || !*s)
		return -1

cut it? Since your call to strtoumax() checks that the string was parsed to the end by insisting *p is NUL?

If you are trying to more explicitly insist that s[] has only digits, which may not be a bad idea, as that is what we generally expect, then

	if (!s[0] || s[strspn(s, "0123456789")])
		return -1;
perhaps.
> +	uim = strtoumax(s, &p, base);
> +	if ((errno || *p || p == s) || uim > SIZE_MAX)
> +		return -1;

And with !s[0] upfront, we can discard (p==s) case from here. Other strto*() wrappers we have may need the "cannot be empty" check, because they do not need any upfront validation of s[] like we do here (we do so to reject negative numbers), but since we do need to check s[] before calling the system strto*() function anyway, it is OK to be different here from the others.

If uintmax_t and size_t are of the same width, then (SIZE_MAX < uim) becomes mathmatically impossible, but hopefully no compiler or static checker is stupid enough to warn against it.

Show 7 quoted lines
> +	*result = uim;
> +	return 0;
> +}
> +
>  static inline int strtol_i(char const *s, int base, int *result)
>  {
>  	long ul;
Previous: Pablo SabaterNext: Pablo Sabater
Message 266 of 397 in “cat-file: add remote-object-info to batch-command”
  1. 0/6 cat-file: add remote-object-info to batch-commandEric Ju, Jun 28, 2024
  2. 1/6 fetch-pack: refactor packet writingEric Ju, Jun 28, 2024
  3. Karthik NayakJul 4, 2024
  4. Peijian JuJul 8, 2024
  5. Karthik NayakJul 10, 2024
  6. Peijian JuJul 15, 2024
  7. 2/6 fetch-pack: move fetch initializationEric Ju, Jun 28, 2024
  8. 3/6 serve: advertise object-info featureEric Ju, Jun 28, 2024
  9. 4/6 transport: add client support for object-infoEric Ju, Jun 28, 2024
  10. Toon claesJul 9, 2024
  11. Junio C HamanoJul 9, 2024
  12. Peijian JuJul 13, 2024
  13. Peijian JuJul 13, 2024
  14. Karthik NayakJul 10, 2024
  15. Peijian JuJul 16, 2024
  16. 5/6 cat-file: add declaration of variable i inside its for loopEric Ju, Jun 28, 2024
  17. Karthik NayakJul 10, 2024
  18. Peijian JuJul 16, 2024
  19. 6/6 cat-file: add remote-object-info to batch-commandEric Ju, Jun 28, 2024
  20. Justin ToblerJul 9, 2024
  21. Peijian JuJul 12, 2024
  22. Toon claesJul 9, 2024
  23. Peijian JuJul 13, 2024
  24. Karthik NayakJul 10, 2024
  25. Peijian JuJul 17, 2024
  26. 0/6 cat-file: add remote-object-info to batch-commandEric Ju, Jul 20, 2024
  27. 1/6 fetch-pack: refactor packet writingEric Ju, Jul 20, 2024
  28. Christian CouderSep 24, 2024
  29. Peijian JuSep 25, 2024
  30. 2/6 fetch-pack: move fetch initializationEric Ju, Jul 20, 2024
  31. 3/6 serve: advertise object-info featureEric Ju, Jul 20, 2024
  32. 4/6 transport: add client support for object-infoEric Ju, Jul 20, 2024
  33. Christian CouderSep 24, 2024
  34. Junio C HamanoSep 24, 2024
  35. Peijian JuSep 25, 2024
  36. 5/6 cat-file: add declaration of variable i inside its for loopEric Ju, Jul 20, 2024
  37. 6/6 cat-file: add remote-object-info to batch-commandEric Ju, Jul 20, 2024
  38. Toon ClaesSep 11, 2024
  39. Peijian JuSep 25, 2024
  40. Christian CouderSep 24, 2024
  41. Peijian JuSep 25, 2024
  42. Peijian JuAug 22, 2024
  43. 0/6 cat-file: add remote-object-info to batch-commandEric Ju, Sep 26, 2024
  44. 1/6 fetch-pack: refactor packet writingEric Ju, Sep 26, 2024
  45. 2/6 fetch-pack: move fetch initializationEric Ju, Sep 26, 2024
  46. 3/6 serve: advertise object-info featureEric Ju, Sep 26, 2024
  47. 4/6 transport: add client support for object-infoEric Ju, Sep 26, 2024
  48. Christian CouderOct 23, 2024
  49. Peijian JuOct 24, 2024
  50. 5/6 cat-file: add declaration of variable i inside its for loopEric Ju, Sep 26, 2024
  51. 6/6 cat-file: add remote-object-info to batch-commandEric Ju, Sep 26, 2024
  52. Christian CouderOct 23, 2024
  53. Taylor BlauOct 23, 2024
  54. Peijian JuOct 24, 2024
  55. Peijian JuOct 24, 2024
  56. 0/6 cat-file: add remote-object-info to batch-commandEric Ju, Oct 24, 2024
  57. 1/6 fetch-pack: refactor packet writingEric Ju, Oct 24, 2024
  58. karthik nayakOct 25, 2024
  59. Peijian JuOct 25, 2024
  60. 2/6 fetch-pack: move fetch initializationEric Ju, Oct 24, 2024
  61. 3/6 serve: advertise object-info featureEric Ju, Oct 24, 2024
  62. 4/6 transport: add client support for object-infoEric Ju, Oct 24, 2024
  63. karthik nayakOct 25, 2024
  64. Peijian JuOct 28, 2024
  65. 5/6 cat-file: add declaration of variable i inside its for loopEric Ju, Oct 24, 2024
  66. 6/6 cat-file: add remote-object-info to batch-commandEric Ju, Oct 24, 2024
  67. karthik nayakOct 25, 2024
  68. Christian CouderOct 25, 2024
  69. Taylor BlauOct 25, 2024
  70. Peijian JuOct 27, 2024
  71. Taylor BlauOct 28, 2024
  72. 0/6 cat-file: add remote-object-info to batch-commandEric Ju, Oct 28, 2024
  73. 1/6 fetch-pack: refactor packet writingEric Ju, Oct 28, 2024
  74. Christian CouderNov 5, 2024
  75. Junio C HamanoNov 6, 2024
  76. Peijian JuNov 6, 2024
  77. Peijian JuNov 6, 2024
  78. 2/6 fetch-pack: move fetch initializationEric Ju, Oct 28, 2024
  79. 3/6 serve: advertise object-info featureEric Ju, Oct 28, 2024
  80. 4/6 transport: add client support for object-infoEric Ju, Oct 28, 2024
  81. 5/6 cat-file: add declaration of variable i inside its for loopEric Ju, Oct 28, 2024
  82. 6/6 cat-file: add remote-object-info to batch-commandEric Ju, Oct 28, 2024
  83. 0/6 cat-file: add remote-object-info to batch-commandEric Ju, Nov 8, 2024
  84. 1/6 cat-file: add declaration of variable i inside its for loopEric Ju, Nov 8, 2024
  85. 2/6 fetch-pack: refactor packet writingEric Ju, Nov 8, 2024
  86. 3/6 fetch-pack: move fetch initializationEric Ju, Nov 8, 2024
  87. 4/6 serve: advertise object-info featureEric Ju, Nov 8, 2024
  88. 5/6 transport: add client support for object-infoEric Ju, Nov 8, 2024
  89. 6/6 cat-file: add remote-object-info to batch-commandEric Ju, Nov 8, 2024
  90. Junio C HamanoNov 11, 2024
  91. Peijian JuNov 18, 2024
  92. Junio C HamanoNov 19, 2024
  93. Patrick SteinhardtNov 19, 2024
  94. Junio C HamanoNov 19, 2024
  95. Peijian JuNov 19, 2024
  96. Junio C HamanoNov 20, 2024
  97. 0/6 cat-file: add remote-object-info to batch-commandEric Ju, Nov 25, 2024
  98. 1/6 cat-file: add declaration of variable i inside its for loopEric Ju, Nov 25, 2024
  99. Patrick SteinhardtNov 25, 2024
  100. Peijian JuDec 3, 2024
  101. 2/6 fetch-pack: refactor packet writingEric Ju, Nov 25, 2024
  102. Patrick SteinhardtNov 25, 2024
  103. Peijian JuDec 3, 2024
  104. 3/6 fetch-pack: move fetch initializationEric Ju, Nov 25, 2024
  105. 4/6 serve: advertise object-info featureEric Ju, Nov 25, 2024
  106. 5/6 transport: add client support for object-infoEric Ju, Nov 25, 2024
  107. Patrick SteinhardtNov 25, 2024
  108. Peijian JuDec 3, 2024
  109. 6/6 cat-file: add remote-object-info to batch-commandEric Ju, Nov 25, 2024
  110. Patrick SteinhardtNov 25, 2024
  111. Peijian JuDec 3, 2024
  112. Patrick SteinhardtDec 5, 2024
  113. Christian CouderDec 5, 2024
  114. 0/6 add remote-object-info to batch-commandEric Ju, Dec 23, 2024
  115. 1/6 cat-file: add declaration of variable i inside its for loopEric Ju, Dec 23, 2024
  116. 2/6 fetch-pack: refactor packet writingEric Ju, Dec 23, 2024
  117. 3/6 fetch-pack: move fetch initializationEric Ju, Dec 23, 2024
  118. 4/6 serve: advertise object-info featureEric Ju, Dec 23, 2024
  119. 5/6 transport: add client support for object-infoEric Ju, Dec 23, 2024
  120. Calvin WanJan 7, 2025
  121. Junio C HamanoJan 7, 2025
  122. Peijian JuJan 8, 2025
  123. 6/6 cat-file: add remote-object-info to batch-commandEric Ju, Dec 23, 2024
  124. Calvin WanJan 7, 2025
  125. Junio C HamanoDec 26, 2024
  126. Peijian JuDec 30, 2024
  127. 0/8 cat-file: add remote-object-info to batch-commandEric Ju, Jan 8, 2025
  128. 1/8 git-compat-util: add strtoul_ul() with error handlingEric Ju, Jan 8, 2025
  129. Christian CouderJan 10, 2025
  130. Peijian JuJan 14, 2025
  131. 2/8 cat-file: add declaration of variable i inside its for loopEric Ju, Jan 8, 2025
  132. Christian CouderJan 10, 2025
  133. Peijian JuJan 14, 2025
  134. 3/8 cat-file: split test utility functions into a separate library fileEric Ju, Jan 8, 2025
  135. Christian CouderJan 10, 2025
  136. Peijian JuJan 14, 2025
  137. 4/8 fetch-pack: refactor packet writingEric Ju, Jan 8, 2025
  138. 5/8 fetch-pack: move fetch initializationEric Ju, Jan 8, 2025
  139. 6/8 serve: advertise object-info featureEric Ju, Jan 8, 2025
  140. 7/8 transport: add client support for object-infoEric Ju, Jan 8, 2025
  141. 8/8 cat-file: add remote-object-info to batch-commandEric Ju, Jan 8, 2025
  142. Christian CouderJan 10, 2025
  143. Peijian JuJan 14, 2025
  144. 0/8 cat-file: add remote-object-info to batch-commandEric Ju, Jan 14, 2025
  145. 1/8 git-compat-util: add strtoul_ul() with error handlingEric Ju, Jan 14, 2025
  146. 2/8 cat-file: add declaration of variable i inside its for loopEric Ju, Jan 14, 2025
  147. 3/8 t1006: split test utility functions into new "lib-cat-file.sh"Eric Ju, Jan 14, 2025
  148. 5/8 fetch-pack: move fetch initializationEric Ju, Jan 14, 2025
  149. 4/8 fetch-pack: refactor packet writingEric Ju, Jan 14, 2025
  150. 6/8 serve: advertise object-info featureEric Ju, Jan 14, 2025
  151. 7/8 transport: add client support for object-infoEric Ju, Jan 14, 2025
  152. Jeff KingFeb 1, 2025
  153. Peijian JuFeb 20, 2025
  154. 8/8 cat-file: add remote-object-info to batch-commandEric Ju, Jan 14, 2025
  155. Jeff KingFeb 1, 2025
  156. Peijian JuFeb 21, 2025
  157. Jeff KingFeb 24, 2025
  158. Peijian JuMar 12, 2025
  159. 0/8 cat-file: add remote-object-info to batch-commandEric Ju, Feb 21, 2025
  160. 1/8 git-compat-util: add strtoul_ul() with error handlingEric Ju, Feb 21, 2025
  161. 2/8 cat-file: add declaration of variable i inside its for loopEric Ju, Feb 21, 2025
  162. 4/8 fetch-pack: refactor packet writingEric Ju, Feb 21, 2025
  163. 3/8 t1006: split test utility functions into new "lib-cat-file.sh"Eric Ju, Feb 21, 2025
  164. 5/8 fetch-pack: move fetch initializationEric Ju, Feb 21, 2025
  165. 6/8 serve: advertise object-info featureEric Ju, Feb 21, 2025
  166. 7/8 transport: add client support for object-infoEric Ju, Feb 21, 2025
  167. 8/8 cat-file: add remote-object-info to batch-commandEric Ju, Feb 21, 2025
  168. Junio C HamanoFeb 24, 2025
  169. Peijian JuMar 11, 2025
  170. Jeff KingFeb 24, 2025
  171. Peijian JuMar 12, 2025
  172. Jeff KingMar 13, 2025
  173. Peijian JuMar 21, 2025
  174. Jeff KingMar 24, 2025
  175. [GSoC] Re: [PATCH v11 8/8] cat-file: add remote-object-info to batch-commandPablo Sabater, Mar 12, 2026
  176. 00/12 cat-file: add remote-object-info to batch-commandPablo Sabater, Jun 8, 2026
  177. 01/12 transport-helper: fix memory leak of helper on disconnectPablo Sabater, Jun 8, 2026
  178. 02/12 git-compat-util: add strtoul_ul() with error handlingPablo Sabater, Jun 8, 2026
  179. Chandra PratapJun 9, 2026
  180. 03/12 cat-file: add declaration of variable i inside its for loopPablo Sabater, Jun 8, 2026
  181. Junio C HamanoJun 8, 2026
  182. Pablo SabaterJun 9, 2026
  183. 04/12 t1006: split test utility functions into new "lib-cat-file.sh"Pablo Sabater, Jun 8, 2026
  184. Chandra PratapJun 9, 2026
  185. Pablo SabaterJun 9, 2026
  186. 05/12 fetch-pack: move function to connect.cPablo Sabater, Jun 8, 2026
  187. 06/12 connect: refactor packet writingPablo Sabater, Jun 8, 2026
  188. 07/12 fetch-pack: move fetch initializationPablo Sabater, Jun 8, 2026
  189. 08/12 serve: advertise object-info featurePablo Sabater, Jun 8, 2026
  190. 09/12 transport: add client support for object-infoPablo Sabater, Jun 8, 2026
  191. Junio C HamanoJun 16, 2026
  192. Junio C HamanoJun 16, 2026
  193. 10/12 cat-file: add remote-object-info to batch-commandPablo Sabater, Jun 8, 2026
  194. 11/12 cat-file: validate remote atoms with allow_listPablo Sabater, Jun 8, 2026
  195. 12/12 cat-file: make remote-object-info allow-list dynamicPablo Sabater, Jun 8, 2026
  196. Chandra PratapJun 9, 2026
  197. Pablo SabaterJun 9, 2026
  198. Chandra PratapJun 17, 2026
  199. Junio C HamanoJun 9, 2026
  200. 00/12 cat-file: add remote-object-info to batch-commandPablo Sabater, Jun 19, 2026
  201. 01/12 transport-helper: fix memory leak of helper on disconnectPablo Sabater, Jun 19, 2026
  202. 02/12 git-compat-util: add strtoul_ul() with error handlingPablo Sabater, Jun 19, 2026
  203. Pablo SabaterJun 19, 2026
  204. 03/12 cat-file: declare loop counter inside for()Pablo Sabater, Jun 19, 2026
  205. Karthik NayakJun 22, 2026
  206. 04/12 t1006: split test utility functions into new "lib-cat-file.sh"Pablo Sabater, Jun 19, 2026
  207. Pablo SabaterJun 19, 2026
  208. 05/12 fetch-pack: move function to connect.cPablo Sabater, Jun 19, 2026
  209. Chandra PratapJun 21, 2026
  210. Pablo SabaterJun 24, 2026
  211. Karthik NayakJun 22, 2026
  212. Pablo SabaterJun 24, 2026
  213. 06/12 connect: refactor packet writingPablo Sabater, Jun 19, 2026
  214. Karthik NayakJun 22, 2026
  215. Pablo SabaterJun 24, 2026
  216. Karthik NayakJun 24, 2026
  217. Junio C HamanoJun 24, 2026
  218. Karthik NayakJun 26, 2026
  219. 07/12 fetch-pack: move fetch initializationPablo Sabater, Jun 19, 2026
  220. 08/12 serve: advertise object-info featurePablo Sabater, Jun 19, 2026
  221. 09/12 transport: add client support for object-infoPablo Sabater, Jun 19, 2026
  222. 10/12 cat-file: add remote-object-info to batch-commandPablo Sabater, Jun 19, 2026
  223. Chandra PratapJun 21, 2026
  224. Junio C HamanoJun 21, 2026
  225. 11/12 cat-file: validate remote atoms with allow_listPablo Sabater, Jun 19, 2026
  226. 12/12 cat-file: make remote-object-info allow-list dynamicPablo Sabater, Jun 19, 2026
  227. Chandra PratapJun 21, 2026
  228. Chandra PratapJun 21, 2026
  229. Chandra PratapJun 21, 2026
  230. 00/13 cat-file: add remote-object-info to batch-commandPablo Sabater, Jun 25, 2026
  231. 01/13 transport-helper: fix memory leak of helper on disconnectPablo Sabater, Jun 25, 2026
  232. 02/13 git-compat-util: add strtoul_szt() with error handlingPablo Sabater, Jun 25, 2026
  233. Junio C HamanoJun 25, 2026
  234. Pablo SabaterJun 26, 2026
  235. Karthik NayakJun 26, 2026
  236. 03/13 cat-file: declare loop counter inside for()Pablo Sabater, Jun 25, 2026
  237. 04/13 t1006: split test utility functions into new "lib-cat-file.sh"Pablo Sabater, Jun 25, 2026
  238. 05/13 fetch-pack: prepare function to be movedPablo Sabater, Jun 25, 2026
  239. Chandra PratapJun 26, 2026
  240. Karthik NayakJun 26, 2026
  241. Pablo SabaterJun 27, 2026
  242. 06/13 fetch-pack: move function to connect.cPablo Sabater, Jun 25, 2026
  243. Chandra PratapJun 26, 2026
  244. Pablo SabaterJun 27, 2026
  245. Karthik NayakJun 26, 2026
  246. Pablo SabaterJun 27, 2026
  247. 07/13 connect: refactor packet writingPablo Sabater, Jun 25, 2026
  248. Karthik NayakJun 26, 2026
  249. Pablo SabaterJun 27, 2026
  250. 08/13 fetch-pack: move fetch initializationPablo Sabater, Jun 25, 2026
  251. 09/13 serve: advertise object-info featurePablo Sabater, Jun 25, 2026
  252. Karthik NayakJun 26, 2026
  253. Pablo SabaterJun 27, 2026
  254. Karthik NayakJun 28, 2026
  255. 10/13 transport: add client support for object-infoPablo Sabater, Jun 25, 2026
  256. Karthik NayakJun 27, 2026
  257. Pablo SabaterJun 27, 2026
  258. 11/13 cat-file: add remote-object-info to batch-commandPablo Sabater, Jun 25, 2026
  259. Karthik NayakJun 27, 2026
  260. Pablo SabaterJun 27, 2026
  261. 12/13 cat-file: validate remote atoms with allow_listPablo Sabater, Jun 25, 2026
  262. 13/13 cat-file: make remote-object-info allow-list dynamicPablo Sabater, Jun 25, 2026
  263. 00/13 cat-file: add remote-object-info to batch-commandPablo Sabater, Jul 1, 2026
  264. 01/13 transport-helper: fix memory leak of helper on disconnectPablo Sabater, Jul 1, 2026
  265. 02/13 git-compat-util: add `strtoumax_szt()` with error handlingPablo Sabater, Jul 1, 2026
  266. Junio C HamanoJul 1, 2026
  267. Pablo SabaterJul 7, 2026
  268. Junio C HamanoJul 7, 2026
  269. Pablo SabaterJul 7, 2026
  270. 03/13 cat-file: declare loop counter inside for()Pablo Sabater, Jul 1, 2026
  271. 04/13 t1006: split test utility functions into new 'lib-cat-file.sh'Pablo Sabater, Jul 1, 2026
  272. 05/13 fetch-pack: drop static `advertise_sid` variablePablo Sabater, Jul 1, 2026
  273. Junio C HamanoJul 1, 2026
  274. 06/13 fetch-pack: move `write_fetch_command_and_capabilities()` to connect.cPablo Sabater, Jul 1, 2026
  275. 07/13 connect: make `write_fetch_command_and_capabilities()` more genericPablo Sabater, Jul 1, 2026
  276. 08/13 fetch-pack: move fetch initializationPablo Sabater, Jul 1, 2026
  277. 09/13 serve: advertise object-info featurePablo Sabater, Jul 1, 2026
  278. 10/13 transport: add client support for object-infoPablo Sabater, Jul 1, 2026
  279. 11/13 cat-file: add remote-object-info to batch-commandPablo Sabater, Jul 1, 2026
  280. 12/13 cat-file: validate remote atoms with an allow-listPablo Sabater, Jul 1, 2026
  281. 13/13 cat-file: make remote-object-info allow-list dynamicPablo Sabater, Jul 1, 2026
  282. 00/13 cat-file: add remote-object-info to batch-commandPablo Sabater, Jul 10, 2026
  283. 01/13 transport-helper: fix memory leak of helper on disconnectPablo Sabater, Jul 10, 2026
  284. 02/13 cat-file: declare loop counter inside for()Pablo Sabater, Jul 10, 2026
  285. 03/13 t1006: split test utility functions into new 'lib-cat-file.sh'Pablo Sabater, Jul 10, 2026
  286. 04/13 fetch-pack: fix hash_algo variable typePablo Sabater, Jul 10, 2026
  287. 05/13 fetch-pack: drop static advertise_sid variablePablo Sabater, Jul 10, 2026
  288. 06/13 fetch-pack: move write_fetch_command_and_capabilities() to connect.cPablo Sabater, Jul 10, 2026
  289. 07/13 connect: make write_fetch_command_and_capabilities() more genericPablo Sabater, Jul 10, 2026
  290. 08/13 fetch-pack: move fetch initializationPablo Sabater, Jul 10, 2026
  291. 09/13 serve: advertise object-info featurePablo Sabater, Jul 10, 2026
  292. 10/13 transport: add client support for object-infoPablo Sabater, Jul 10, 2026
  293. Pablo SabaterJul 14, 2026
  294. 11/13 cat-file: add remote-object-info to batch-commandPablo Sabater, Jul 10, 2026
  295. 12/13 cat-file: validate remote atoms with an allow-listPablo Sabater, Jul 10, 2026
  296. 13/13 cat-file: make remote-object-info allow-list dynamicPablo Sabater, Jul 10, 2026
  297. Chandra PratapJul 12, 2026
  298. 00/13 cat-file: add remote-object-info to batch-commandPablo Sabater, Jul 14, 2026
  299. 01/13 transport-helper: fix memory leak of helper on disconnectPablo Sabater, Jul 14, 2026
  300. 02/13 cat-file: declare loop counter inside for()Pablo Sabater, Jul 14, 2026
  301. 03/13 t1006: split test utility functions into new 'lib-cat-file.sh'Pablo Sabater, Jul 14, 2026
  302. 04/13 fetch-pack: fix hash_algo variable typePablo Sabater, Jul 14, 2026
  303. 05/13 fetch-pack: drop static advertise_sid variablePablo Sabater, Jul 14, 2026
  304. 06/13 fetch-pack: move write_fetch_command_and_capabilities() to connect.cPablo Sabater, Jul 14, 2026
  305. 07/13 connect: make write_fetch_command_and_capabilities() more genericPablo Sabater, Jul 14, 2026
  306. 08/13 fetch-pack: move fetch initializationPablo Sabater, Jul 14, 2026
  307. 09/13 serve: advertise object-info featurePablo Sabater, Jul 14, 2026
  308. 10/13 transport: add client support for object-infoPablo Sabater, Jul 14, 2026
  309. Junio C HamanoJul 14, 2026
  310. Pablo SabaterJul 14, 2026
  311. 11/13 cat-file: add remote-object-info to batch-commandPablo Sabater, Jul 14, 2026
  312. 12/13 cat-file: validate remote atoms with an allow-listPablo Sabater, Jul 14, 2026
  313. 13/13 cat-file: make remote-object-info allow-list dynamicPablo Sabater, Jul 14, 2026
  314. Junio C HamanoJul 14, 2026
  315. Pablo SabaterJul 14, 2026
  316. Junio C HamanoJul 15, 2026
  317. Pablo SabaterJul 15, 2026
  318. Junio C HamanoJul 15, 2026
  319. Pablo SabaterJul 15, 2026
  320. 00/13 cat-file: add remote-object-info to batch-commandPablo Sabater, Jul 15, 2026
  321. 01/13 transport-helper: fix memory leak of helper on disconnectPablo Sabater, Jul 15, 2026
  322. 02/13 cat-file: declare loop counter inside for()Pablo Sabater, Jul 15, 2026
  323. 03/13 t1006: split test utility functions into new 'lib-cat-file.sh'Pablo Sabater, Jul 15, 2026
  324. 04/13 fetch-pack: fix hash_algo variable typePablo Sabater, Jul 15, 2026
  325. 05/13 fetch-pack: drop static advertise_sid variablePablo Sabater, Jul 15, 2026
  326. Karthik NayakJul 15, 2026
  327. Pablo SabaterJul 16, 2026
  328. 06/13 fetch-pack: move write_fetch_command_and_capabilities() to connect.cPablo Sabater, Jul 15, 2026
  329. 07/13 connect: make write_fetch_command_and_capabilities() more genericPablo Sabater, Jul 15, 2026
  330. 08/13 fetch-pack: move fetch initializationPablo Sabater, Jul 15, 2026
  331. 09/13 serve: advertise object-info featurePablo Sabater, Jul 15, 2026
  332. 10/13 transport: add client support for object-infoPablo Sabater, Jul 15, 2026
  333. Junio C HamanoJul 15, 2026
  334. Pablo SabaterJul 15, 2026
  335. Junio C HamanoJul 16, 2026
  336. 11/13 cat-file: add remote-object-info to batch-commandPablo Sabater, Jul 15, 2026
  337. Junio C HamanoJul 15, 2026
  338. Pablo SabaterJul 15, 2026
  339. Karthik NayakJul 15, 2026
  340. 12/13 cat-file: validate remote atoms with an allow-listPablo Sabater, Jul 15, 2026
  341. 13/13 cat-file: make remote-object-info allow-list dynamicPablo Sabater, Jul 15, 2026
  342. Junio C HamanoJul 15, 2026
  343. Pablo SabaterJul 15, 2026
  344. Junio C HamanoJul 15, 2026
  345. Pablo SabaterJul 15, 2026
  346. Junio C HamanoJul 16, 2026
  347. Pablo SabaterJul 16, 2026
  348. Karthik NayakJul 15, 2026
  349. 00/13 cat-file: add remote-object-info to batch-commandPablo Sabater, Jul 17, 2026
  350. 01/13 transport-helper: fix memory leak of helper on disconnectPablo Sabater, Jul 17, 2026
  351. 02/13 cat-file: declare loop counter inside for()Pablo Sabater, Jul 17, 2026
  352. 04/13 fetch-pack: drop the static advertise_sid variablePablo Sabater, Jul 17, 2026
  353. 03/13 t1006: extract helper functions into new 'lib-cat-file.sh'Pablo Sabater, Jul 17, 2026
  354. 05/13 fetch-pack: move write_fetch_command_and_capabilities() to connect.cPablo Sabater, Jul 17, 2026
  355. SZEDER GáborJul 18, 2026
  356. Pablo SabaterJul 18, 2026
  357. 06/13 connect: use unsigned int for hash_algo_by_name() callsPablo Sabater, Jul 17, 2026
  358. 07/13 connect: make write_fetch_command_and_capabilities() more genericPablo Sabater, Jul 17, 2026
  359. 08/13 fetch-pack: move fetch initializationPablo Sabater, Jul 17, 2026
  360. 09/13 protocol-caps: check object existence regardless of the attributes requestedPablo Sabater, Jul 17, 2026
  361. 10/13 serve: advertise object-info featurePablo Sabater, Jul 17, 2026
  362. 11/13 transport: add client support for object-infoPablo Sabater, Jul 17, 2026
  363. 12/13 cat-file: add remote-object-info to batch-commandPablo Sabater, Jul 17, 2026
  364. 13/13 cat-file: make remote-object-info allow-list adapt to the serverPablo Sabater, Jul 17, 2026
  365. 00/13 cat-file: add remote-object-info to batch-commandPablo Sabater, Jul 18, 2026
  366. 01/13 transport-helper: fix memory leak of helper on disconnectPablo Sabater, Jul 18, 2026
  367. 02/13 cat-file: declare loop counter inside for()Pablo Sabater, Jul 18, 2026
  368. 03/13 t1006: extract helper functions into new 'lib-cat-file.sh'Pablo Sabater, Jul 18, 2026
  369. 04/13 fetch-pack: drop the static advertise_sid variablePablo Sabater, Jul 18, 2026
  370. 05/13 fetch-pack: use unsigned int for hash_algo variablePablo Sabater, Jul 18, 2026
  371. 06/13 fetch-pack: move write_fetch_command_and_capabilities() to connect.cPablo Sabater, Jul 18, 2026
  372. 07/13 connect: make write_fetch_command_and_capabilities() more genericPablo Sabater, Jul 18, 2026
  373. 08/13 fetch-pack: move fetch initializationPablo Sabater, Jul 18, 2026
  374. 09/13 protocol-caps: check object existence regardless of the attributes requestedPablo Sabater, Jul 18, 2026
  375. 10/13 serve: advertise object-info featurePablo Sabater, Jul 18, 2026
  376. 11/13 transport: add client support for object-infoPablo Sabater, Jul 18, 2026
  377. 12/13 cat-file: add remote-object-info to batch-commandPablo Sabater, Jul 18, 2026
  378. 13/13 cat-file: make remote-object-info allow-list adapt to the serverPablo Sabater, Jul 18, 2026
  379. Karthik NayakJul 21, 2026
  380. Pablo SabaterJul 22, 2026
  381. Karthik NayakJul 22, 2026
  382. Pablo SabaterJul 22, 2026
  383. 00/13 cat-file: add remote-object-info to batch-commandPablo Sabater, Jul 24, 2026
  384. 01/13 transport-helper: fix memory leak of helper on disconnectPablo Sabater, Jul 24, 2026
  385. 02/13 cat-file: declare loop counter inside for()Pablo Sabater, Jul 24, 2026
  386. 03/13 t1006: extract helper functions into new 'lib-cat-file.sh'Pablo Sabater, Jul 24, 2026
  387. 04/13 fetch-pack: drop the static advertise_sid variablePablo Sabater, Jul 24, 2026
  388. 05/13 fetch-pack: use unsigned int for hash_algo variablePablo Sabater, Jul 24, 2026
  389. 06/13 fetch-pack: move write_fetch_command_and_capabilities() to connect.cPablo Sabater, Jul 24, 2026
  390. 07/13 connect: make write_fetch_command_and_capabilities() more genericPablo Sabater, Jul 24, 2026
  391. 08/13 fetch-pack: move fetch initializationPablo Sabater, Jul 24, 2026
  392. 09/13 protocol-caps: check object existence regardless of the attributes requestedPablo Sabater, Jul 24, 2026
  393. 10/13 serve: advertise object-info featurePablo Sabater, Jul 24, 2026
  394. 11/13 transport: add client support for object-infoPablo Sabater, Jul 24, 2026
  395. 12/13 cat-file: add remote-object-info to batch-commandPablo Sabater, Jul 24, 2026
  396. 13/13 cat-file: make remote-object-info allow-list adapt to the serverPablo Sabater, Jul 24, 2026
  397. Junio C HamanoJul 24, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.