avoid redundant file index additions in install_blob()
diff --git a/lib/worktree.c b/lib/worktree.c
index a161221..71f2090 100644
--- a/lib/worktree.c
+++ b/lib/worktree.c
@@ -624,6 +624,8 @@ install_blob(struct got_worktree *worktree, struct got_fileindex *fileindex,
}
}
+ if (entry == NULL)
+ entry = got_fileindex_entry_get(fileindex, path);
if (entry)
err = got_fileindex_entry_update(entry, ondisk_path,
blob->id.sha1, worktree->base_commit_id->sha1);