load_subtree(): remove unnecessary conditional

At this point in the code, len is *always* <= 20.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Michael Haggerty 2017-08-26 10:28:02 +02:00 коммит произвёл Junio C Hamano
Родитель 65eb8e0ca7
Коммит d3b0c6bebf
1 изменённых файлов: 17 добавлений и 18 удалений

Просмотреть файл

@ -446,7 +446,6 @@ static void load_subtree(struct notes_tree *t, struct leaf_node *subtree,
* If object SHA1 is incomplete (len < 20), and current
* component consists of 2 hex chars, assume note subtree
*/
if (len <= GIT_SHA1_RAWSZ) {
type = PTR_TYPE_NOTE;
l = (struct leaf_node *)
xcalloc(1, sizeof(struct leaf_node));
@ -464,7 +463,7 @@ static void load_subtree(struct notes_tree *t, struct leaf_node *subtree,
"from %s",
type == PTR_TYPE_NOTE ? "note" : "subtree",
oid_to_hex(&l->key_oid), t->ref);
}
continue;
handle_non_note: