index 50a4672d7c68d84024d6ef98e2ca11561d848e27..023adce982c668f39b01652e525b54fd512d5603 100644 (file)
--- a/notes.c
+++ b/notes.c
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;
}