Skip to content

Commit e0f2860

Browse files
committed
Add the experimental git survey command to analyze (large) local repositories (#667)
This command is inspired by [`git sizer`](https://github.com/github/git-sizer), having the advantage of being much closer to the internals of Git. The intention is to provide a built-in command that can be used to analyze large repositories for performance and scaling problems, for growth over time, and to correlate with other measurements (in particular with Trace2 data collected e.g. via https://github.com/git-ecosystem/trace2receiver/).
2 parents 49dc873 + 3be470a commit e0f2860

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

builtin/survey.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include "trace2.h"
1919
#include "tree.h"
2020
#include "tree-walk.h"
21+
#include "color.h"
2122

2223
static const char * const survey_usage[] = {
2324
N_("(EXPERIMENTAL!) git survey <options>"),
@@ -2265,6 +2266,10 @@ int cmd_survey(int argc, const char **argv, const char *prefix)
22652266

22662267
argc = parse_options(argc, argv, prefix, survey_options, survey_usage, 0);
22672268

2269+
color_fprintf_ln(stderr,
2270+
want_color_fd(2, GIT_COLOR_AUTO) ? GIT_COLOR_YELLOW : "",
2271+
"(THIS IS EXPERIMENTAL, EXPECT THE OUTPUT FORMAT TO CHANGE!)");
2272+
22682273
prepare_repo_settings(the_repository);
22692274

22702275
if (survey_opts.show_progress < 0)

0 commit comments

Comments
 (0)