Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2014-04-29 03:39:53 +0400
committerRussell Belfer <rb@github.com>2014-05-02 20:21:33 +0400
commitcd424ad5518c7cfbba10a764d7bc097377ec3995 (patch)
tree1550287498b398515c12cc24c5f974d8ba2dcc45 /src/iterator.c
parent94fb4aadc80c927a59696dc01db03f3a0629dae7 (diff)
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.
Diffstat (limited to 'src/iterator.c')
-rw-r--r--src/iterator.c5
1 files changed, 3 insertions, 2 deletions
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 <ctype.h>
#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--;