diff options
author | Michael Haggerty <mhagger@alum.mit.edu> | 2017-04-16 08:41:36 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-04-16 21:32:46 -0700 |
commit | 5c7bba77b261f0b5979bacf3cb2516baf211d6f5 (patch) | |
tree | 1e2a0f9a38945ef4ab4fc3ddee9a2c4ae257e854 /refs/ref-cache.c | |
parent | refs: handle "refs/bisect/" in `loose_fill_ref_dir()` (diff) | |
download | tgif-5c7bba77b261f0b5979bacf3cb2516baf211d6f5.tar.xz |
do_for_each_entry_in_dir(): eliminate `offset` argument
It was never used.
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs/ref-cache.c')
-rw-r--r-- | refs/ref-cache.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/refs/ref-cache.c b/refs/ref-cache.c index 44440e0c13..38d4c31985 100644 --- a/refs/ref-cache.c +++ b/refs/ref-cache.c @@ -307,18 +307,18 @@ static void sort_ref_dir(struct ref_dir *dir) dir->sorted = dir->nr = i; } -int do_for_each_entry_in_dir(struct ref_dir *dir, int offset, +int do_for_each_entry_in_dir(struct ref_dir *dir, each_ref_entry_fn fn, void *cb_data) { int i; assert(dir->sorted == dir->nr); - for (i = offset; i < dir->nr; i++) { + for (i = 0; i < dir->nr; i++) { struct ref_entry *entry = dir->entries[i]; int retval; if (entry->flag & REF_DIR) { struct ref_dir *subdir = get_ref_dir(entry); sort_ref_dir(subdir); - retval = do_for_each_entry_in_dir(subdir, 0, fn, cb_data); + retval = do_for_each_entry_in_dir(subdir, fn, cb_data); } else { retval = fn(entry, cb_data); } |