From cd424ad5518c7cfbba10a764d7bc097377ec3995 Mon Sep 17 00:00:00 2001 From: Russell Belfer Date: Mon, 28 Apr 2014 16:39:53 -0700 Subject: Add GIT_STATUS_OPT_UPDATE_INDEX and use trace API This adds an option to refresh the stat cache while generating status. It also rips out the GIT_PERF stuff I had an makes use of the trace API to keep statistics about what happens during diff. --- src/iterator.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/iterator.c') diff --git a/src/iterator.c b/src/iterator.c index 03058b956..bebdeba84 100644 --- a/src/iterator.c +++ b/src/iterator.c @@ -11,6 +11,7 @@ #include "ignore.h" #include "buffer.h" #include "submodule.h" +#include "trace.h" #include #define ITERATOR_SET_CB(P,NAME_LC) do { \ @@ -1017,7 +1018,7 @@ static int fs_iterator__expand_dir(fs_iterator *fi) return GIT_ENOTFOUND; } - GIT_PERF_ADD(fi->base.stat_calls, ff->entries.length); + git_trace(GIT_TRACE_TRACE, "stat=%ld", (long)ff->entries.length); fs_iterator__seek_frame_start(fi, ff); @@ -1309,7 +1310,7 @@ static int workdir_iterator__enter_dir(fs_iterator *fi) if (!S_ISDIR(entry->st.st_mode) || !strcmp(GIT_DIR, entry->path)) continue; - GIT_PERF_INC(fi->base.submodule_lookups); + git_trace(GIT_TRACE_TRACE, "submodule_lookup=1"); if (git_submodule__is_submodule(fi->base.repo, entry->path)) { entry->st.st_mode = GIT_FILEMODE_COMMIT; entry->path_len--; -- cgit v1.2.3