mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-29 20:42:23 +00:00
indexer: start parsing input data immediately
Currently, the first call of git_indexer_stream_add adds the data to the underlying pack file and opens it for later use, but doesn't start parsing the already available data. This means, git_indexer_stream_finalize only works if git_indexer_stream_add was called at least twice. Kill this limitation by parsing available data immediately.
This commit is contained in:
parent
798e4d53dc
commit
f9fd710581
@ -313,8 +313,6 @@ int git_indexer_stream_add(git_indexer_stream *idx, const void *data, size_t siz
|
|||||||
mwf = &idx->pack->mwf;
|
mwf = &idx->pack->mwf;
|
||||||
if (git_mwindow_file_register(&idx->pack->mwf) < 0)
|
if (git_mwindow_file_register(&idx->pack->mwf) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!idx->parsed_header) {
|
if (!idx->parsed_header) {
|
||||||
|
Loading…
Reference in New Issue
Block a user