Signed-off-by: Nguyễn Thái Ngọc Duy <[email protected]>
---
packv4-parse.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/packv4-parse.c b/packv4-parse.c
index 88b7aa1..31c89c7 100644
--- a/packv4-parse.c
+++ b/packv4-parse.c
@@ -473,16 +473,19 @@ static int decode_entries(struct packed_git *p, struct
pack_window **w_curs,
if (++scp - src >= avail - 20)
return -1;
+ switch (*scp++ & 0xf) {
/* is this a canonical tree object? */
- if ((*scp & 0xf) == OBJ_TREE) {
+ case OBJ_TREE:
+ case OBJ_REF_DELTA:
return copy_canonical_tree_entries(p, obj_offset,
start, count,
dstp, sizep);
- }
-
/* let's still make sure this is actually a pv4 tree */
- if ((*scp++ & 0xf) != OBJ_PV4_TREE)
+ case OBJ_PV4_TREE:
+ break;
+ default:
return -1;
+ }
nb_entries = decode_varint(&scp);
if (!count)
--
1.8.2.83.gc99314b
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html