Skip to content

Commit

Permalink
Adapt to newer code
Browse files Browse the repository at this point in the history
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
  • Loading branch information
carlosmn committed Aug 4, 2011
1 parent 414dcb3 commit e23d7e7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions index-pack.c
Expand Up @@ -12,6 +12,7 @@ int index_cb(const git_indexer_stats *stats, void *data)
int index_pack(git_repository *repo, int argc, char **argv)
{
git_indexer *indexer;
git_indexer_stats stats;
int error;
char hash[GIT_OID_HEXSZ + 1] = {0};

Expand All @@ -24,14 +25,14 @@ int index_pack(git_repository *repo, int argc, char **argv)
if (error < GIT_SUCCESS)
return error;

error = git_indexer_run(indexer, index_cb, NULL);
error = git_indexer_run(indexer, &stats);
if (error < GIT_SUCCESS)
return error;

puts("");
error = git_indexer_write(indexer);

git_oid_fmt(hash, git_indexer_result(indexer));
git_oid_fmt(hash, git_indexer_hash(indexer));
puts(hash);

git_indexer_free(indexer);
Expand Down

0 comments on commit e23d7e7

Please sign in to comment.