Commit Diff


commit - b6d05318cb07e2fea989551c6388b8ea3317e92b
commit + 5f9fef37548c12ab4d87590e1d6d2cb0929e58e6
blob - a161221afac60aee49eeed1c62a75ef2f9fec686
blob + 71f2090284801acae74a36d8b9fd3e297c521bb9
--- lib/worktree.c
+++ lib/worktree.c
@@ -624,6 +624,8 @@ install_blob(struct got_worktree *worktree, struct got
 		}
 	}
 
+	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);