diff options
author | Carlos Martín Nieto <carlos@cmartin.tk> | 2011-10-22 11:36:18 +0200 |
---|---|---|
committer | Carlos Martín Nieto <carlos@cmartin.tk> | 2011-10-27 16:13:09 -0700 |
commit | 899cb7a876a13f0031484db799a84b613c690c21 (patch) | |
tree | 76ff683f50243e245246628d6e9183d4a5e06f6d | |
parent | d533c8885b83115fbf4ca3a899621c263894dec4 (diff) | |
download | libgit2-899cb7a876a13f0031484db799a84b613c690c21.tar.gz |
status: remove git_index_entry_bypos
This function is already implemented (better) as git_index_get. Change
the only caller to use that function.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
-rw-r--r-- | src/status.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/status.c b/src/status.c index 1deade9a5..62b3fcb7f 100644 --- a/src/status.c +++ b/src/status.c @@ -337,17 +337,6 @@ static const git_tree_entry *git_tree_entry_bypos(git_tree *tree, unsigned int i return git_vector_get(&tree->entries, idx); } -/* - * Convenience method to enumerate the index. This method is not supposed to be exposed - * as part of the index API because it precludes that the index will not be altered - * while the enumeration is being processed. Which wouldn't be very API friendly :) - */ -static const git_index_entry *git_index_entry_bypos(git_index *index, unsigned int idx) -{ - assert(index); - return git_vector_get(&index->entries, idx); -} - /* Greatly inspired from JGit IndexTreeWalker */ /* https://github.com/spearce/jgit/blob/ed47e29c777accfa78c6f50685a5df2b8f5b8ff5/org.spearce.jgit/src/org/spearce/jgit/lib/IndexTreeWalker.java#L88 */ @@ -371,7 +360,7 @@ static int dirent_cb(void *state, char *a) while (1) { m = git_tree_entry_bypos(st->tree, st->tree_position); - entry = git_index_entry_bypos(st->index, st->index_position); + entry = git_index_get(st->index, st->index_position); if ((m == NULL) && (a == NULL) && (entry == NULL)) return GIT_SUCCESS; |