Thread (1 message) 1 message, 1 author, 2018-03-09

Re: [PATCH/RFC v3 04/12] pack-objects: use bitfield for object_entry::depth

From: Junio C Hamano <hidden>
Date: 2018-03-09 23:07:26

Nguyễn Thái Ngọc Duy  [off-list ref] writes:
+	Maximum value is 4095.
  ...
+	if (depth > (1 << OE_DEPTH_BITS))
+		die(_("delta chain depth %d is greater than maximum limit %d"),
+		    depth, (1 << OE_DEPTH_BITS));
+
Do I see an off-by-one here?  Ie.

	if ((1 << OE_DEPATH_BITS) <= depth)
		die("depth that is 4096 or deeper is too much");
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help