Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/index/Index.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,13 @@ QList<git::Commit> Index::commits(const QList<Posting> &postings) const {
// Look up commits.
QSet<git::Commit> commits;
foreach (const Posting &posting, postings) {
// FIXME: Remove deleted commits on write.
if (git::Commit commit = mRepo.lookupCommit(mIds.at(posting.id)))
commits.insert(commit);
// If we fail this check, then the index is mismatching the repo
// The FIXME below might be the cause of that
if (posting.id < mIds.size()) {
// FIXME: Remove deleted commits on write.
if (git::Commit commit = mRepo.lookupCommit(mIds.at(posting.id)))
commits.insert(commit);
}
}

return commits.values();
Expand Down
Loading