Commit 7c63a33f by Carlos Martín Nieto

indexer: bring back the error message on duplcate commits

It turns out that erroring out on duplicate commits is the right thing
to do, but git was not hitting the bug on the server-side.

Bring back a descriptive error message in case of duplicate entries and
error out.
parent dccf59ad
......@@ -293,6 +293,13 @@ static int store_object(git_indexer *idx)
goto on_error;
}
if (error == 0) {
giterr_set(GITERR_INDEXER, "duplicate object %s found in pack", git_oid_tostr_s(&pentry->sha1));
git__free(pentry);
goto on_error;
}
kh_value(idx->pack->idx_cache, k) = pentry;
git_oid_cpy(&entry->oid, &oid);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment