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

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/dir.h
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2021-05-12 20:28:15 +0300
committerJunio C Hamano <gitster@pobox.com>2021-05-13 02:45:02 +0300
commit7fe1ffdafa56b8453a47a40b866d029f24a56d76 (patch)
tree178264f1a1349c42186beae4af727d21a4d66805 /dir.h
parent7f9dd87922c9065c8adcea1469c3caf3b3af2afa (diff)
dir: report number of visited directories and paths with trace2
Provide more statistics in trace2 output that include the number of directories and total paths visited by the directory traversal logic. Subsequent patches will take advantage of this to ensure we do not unnecessarily traverse into ignored directories. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'dir.h')
-rw-r--r--dir.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/dir.h b/dir.h
index facfae4740..70c750e305 100644
--- a/dir.h
+++ b/dir.h
@@ -336,6 +336,10 @@ struct dir_struct {
struct oid_stat ss_info_exclude;
struct oid_stat ss_excludes_file;
unsigned unmanaged_exclude_files;
+
+ /* Stats about the traversal */
+ unsigned visited_paths;
+ unsigned visited_directories;
};
/*Count the number of slashes for string s*/