diff options
| author | Ben Straub <bstraub@github.com> | 2012-07-30 14:37:40 -0700 |
|---|---|---|
| committer | Ben Straub <bstraub@github.com> | 2012-07-30 14:37:40 -0700 |
| commit | f1587b97a11e3a7283b32f5af46b7d057b8be4c5 (patch) | |
| tree | b028efd2921b06c5c94db33abea9b83d0ff6edfb /src/checkout.c | |
| parent | e0681f6d07a9f6041e7450af4715a8df8552ad2e (diff) | |
| download | libgit2-f1587b97a11e3a7283b32f5af46b7d057b8be4c5.tar.gz | |
Checkout: use git_index_read_tree_with_stats.
New variant of git_index_read_tree that fills in
the 'total' field of a git_indexer_stats struct
as it's walking the tree.
Diffstat (limited to 'src/checkout.c')
| -rw-r--r-- | src/checkout.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/checkout.c b/src/checkout.c index 81389a77a..3eed002ec 100644 --- a/src/checkout.c +++ b/src/checkout.c @@ -191,8 +191,7 @@ int git_checkout_head(git_repository *repo, git_checkout_opts *opts, git_indexer if (!git_repository_head_tree(&tree, repo)) { git_index *idx; if (!(retcode = git_repository_index(&idx, repo))) { - /* TODO: Make git_index_read_tree fill in stats->total */ - if (!(retcode = git_index_read_tree(idx, tree))) { + if (!(retcode = git_index_read_tree_with_stats(idx, tree, stats))) { retcode = git_tree_walk(tree, checkout_walker, GIT_TREEWALK_POST, &payload); } git_index_free(idx); |
