Commit 48b3ad4f by Carlos Martín Nieto

Move pack index writing to a public function

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
parent b7c44096
......@@ -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_run(git_indexer *idx, git_indexer_stats *stats);
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);
......
......@@ -166,7 +166,7 @@ static void index_path(char *path, git_indexer *idx)
memcpy(ptr, suffix, STRLEN(suffix));
}
static int write_index(git_indexer *idx)
int git_indexer_write(git_indexer *idx)
{
git_mwindow *w = NULL;
int error, namelen;
......@@ -358,12 +358,6 @@ int git_indexer_run(git_indexer *idx, git_indexer_stats *stats)
stats->processed = ++processed;
}
/*
* All's gone well, so let's write the index file.
*/
error = write_index(idx);
/* Delete keep file */
cleanup:
git_mwindow_free_all(mwf);
......
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