From: Junio C Hamano Date: Tue, 19 Sep 2017 01:47:52 +0000 (+0900) Subject: Merge branch 'mh/notes-cleanup' X-Git-Tag: v2.15.0-rc0~94 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/30675f7021f92b0e830fdb3c96370826d8f6723f Merge branch 'mh/notes-cleanup' Code clean-up. * mh/notes-cleanup: load_subtree(): check that `prefix_len` is in the expected range load_subtree(): declare some variables to be `size_t` hex_to_bytes(): simpler replacement for `get_oid_hex_segment()` get_oid_hex_segment(): don't pad the rest of `oid` load_subtree(): combine some common code get_oid_hex_segment(): return 0 on success load_subtree(): only consider blobs to be potential notes load_subtree(): check earlier whether an internal node is a tree entry load_subtree(): separate logic for internal vs. terminal entries load_subtree(): fix incorrect comment load_subtree(): reduce the scope of some local variables load_subtree(): remove unnecessary conditional notes: make GET_NIBBLE macro more robust --- 30675f7021f92b0e830fdb3c96370826d8f6723f diff --cc notes.c index f090c88363,27d232f294..5c62862574 --- a/notes.c +++ b/notes.c @@@ -421,11 -410,8 +410,8 @@@ static void load_subtree(struct notes_t void *buf; struct tree_desc desc; struct name_entry entry; - int len, path_len; - unsigned char type; - struct leaf_node *l; - buf = fill_tree_descriptor(&desc, subtree->val_oid.hash); + buf = fill_tree_descriptor(&desc, &subtree->val_oid); if (!buf) die("Could not read %s for notes-index", oid_to_hex(&subtree->val_oid));