X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=notes.c;h=023adce982c668f39b01652e525b54fd512d5603;hb=0901d5a2ef80996cf64c8afeaec765e1bc09f795;hp=50a4672d7c68d84024d6ef98e2ca11561d848e27;hpb=9eba92f684ad9fb1b2e9b99f3f406048fece266d;p=git.git diff --git a/notes.c b/notes.c index 50a4672d7..023adce98 100644 --- a/notes.c +++ b/notes.c @@ -331,6 +331,8 @@ static void load_subtree(struct leaf_node *subtree, struct int_node *node, hashcpy(l->key_sha1, commit_sha1); hashcpy(l->val_sha1, entry.sha1); if (len < 20) { + if (!S_ISDIR(entry.mode)) + continue; /* entry cannot be subtree */ l->key_sha1[19] = (unsigned char) len; type = PTR_TYPE_SUBTREE; }