mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-09 15:00:04 +00:00
Move pack index writing to a public function
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
This commit is contained in:
parent
b7c44096ae
commit
48b3ad4f15
@ -15,6 +15,7 @@ typedef struct git_indexer git_indexer;
|
|||||||
GIT_EXTERN(int) git_indexer_new(git_indexer **out, const char *packname);
|
GIT_EXTERN(int) git_indexer_new(git_indexer **out, const char *packname);
|
||||||
GIT_EXTERN(int) git_indexer_run(git_indexer *idx, git_indexer_stats *stats);
|
GIT_EXTERN(int) git_indexer_run(git_indexer *idx, git_indexer_stats *stats);
|
||||||
GIT_EXTERN(const git_oid *) git_indexer_result(git_indexer *idx);
|
GIT_EXTERN(const git_oid *) git_indexer_result(git_indexer *idx);
|
||||||
|
GIT_EXTERN(int) git_indexer_write(git_indexer *idx);
|
||||||
GIT_EXTERN(void) git_indexer_free(git_indexer *idx);
|
GIT_EXTERN(void) git_indexer_free(git_indexer *idx);
|
||||||
|
|
||||||
|
|
||||||
|
@ -166,7 +166,7 @@ static void index_path(char *path, git_indexer *idx)
|
|||||||
memcpy(ptr, suffix, STRLEN(suffix));
|
memcpy(ptr, suffix, STRLEN(suffix));
|
||||||
}
|
}
|
||||||
|
|
||||||
static int write_index(git_indexer *idx)
|
int git_indexer_write(git_indexer *idx)
|
||||||
{
|
{
|
||||||
git_mwindow *w = NULL;
|
git_mwindow *w = NULL;
|
||||||
int error, namelen;
|
int error, namelen;
|
||||||
@ -358,12 +358,6 @@ int git_indexer_run(git_indexer *idx, git_indexer_stats *stats)
|
|||||||
stats->processed = ++processed;
|
stats->processed = ++processed;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* All's gone well, so let's write the index file.
|
|
||||||
*/
|
|
||||||
error = write_index(idx);
|
|
||||||
|
|
||||||
/* Delete keep file */
|
|
||||||
cleanup:
|
cleanup:
|
||||||
git_mwindow_free_all(mwf);
|
git_mwindow_free_all(mwf);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user