diff options
author | Ben Straub <bstraub@github.com> | 2012-07-30 14:52:46 -0700 |
---|---|---|
committer | Ben Straub <bstraub@github.com> | 2012-07-30 15:48:06 -0700 |
commit | 4bf5115642b64851f9a32a8157010b588bf44103 (patch) | |
tree | 3b6096c0f39feacd11c40ceb1a38c68b7c2b844a /src | |
parent | 84595a30c01d5808ff71fda8ab63603214d665bf (diff) | |
download | libgit2-4bf5115642b64851f9a32a8157010b588bf44103.tar.gz |
Enable stats on git_index_read_tree.
Replace with the contents of
git_index_read_tree_with_stats() and improve
documentation comments.
Diffstat (limited to 'src')
-rw-r--r-- | src/checkout.c | 2 | ||||
-rw-r--r-- | src/index.c | 7 | ||||
-rw-r--r-- | src/reset.c | 2 |
3 files changed, 3 insertions, 8 deletions
diff --git a/src/checkout.c b/src/checkout.c index 3eed002ec..87116ba19 100644 --- a/src/checkout.c +++ b/src/checkout.c @@ -191,7 +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))) { - if (!(retcode = git_index_read_tree_with_stats(idx, tree, stats))) { + if (!(retcode = git_index_read_tree(idx, tree, stats))) { retcode = git_tree_walk(tree, checkout_walker, GIT_TREEWALK_POST, &payload); } git_index_free(idx); diff --git a/src/index.c b/src/index.c index 434c1f102..5f6206554 100644 --- a/src/index.c +++ b/src/index.c @@ -1020,7 +1020,7 @@ static int read_tree_cb(const char *root, const git_tree_entry *tentry, void *da return 0; } -int git_index_read_tree_with_stats(git_index *index, git_tree *tree, git_indexer_stats *stats) +int git_index_read_tree(git_index *index, git_tree *tree, git_indexer_stats *stats) { git_indexer_stats dummy_stats; read_tree_data rtd = {index, NULL}; @@ -1033,8 +1033,3 @@ int git_index_read_tree_with_stats(git_index *index, git_tree *tree, git_indexer return git_tree_walk(tree, read_tree_cb, GIT_TREEWALK_POST, &rtd); } - -int git_index_read_tree(git_index *index, git_tree *tree) -{ - return git_index_read_tree_with_stats(index, tree, NULL); -} diff --git a/src/reset.c b/src/reset.c index 14f7a236a..1379f6442 100644 --- a/src/reset.c +++ b/src/reset.c @@ -80,7 +80,7 @@ int git_reset( goto cleanup; } - if (git_index_read_tree(index, tree) < 0) { + if (git_index_read_tree(index, tree, NULL) < 0) { giterr_set(GITERR_INDEX, "%s - Failed to update the index.", ERROR_MSG); goto cleanup; } |