Skip to content

Commit

Permalink
Add the experimental git survey command to analyze (large) local repo…
Browse files Browse the repository at this point in the history
…sitories (#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/).
  • Loading branch information
dscho committed Jul 17, 2024
2 parents 49dc873 + 3be470a commit e0f2860
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions builtin/survey.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "trace2.h"
#include "tree.h"
#include "tree-walk.h"
#include "color.h"

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

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

color_fprintf_ln(stderr,
want_color_fd(2, GIT_COLOR_AUTO) ? GIT_COLOR_YELLOW : "",
"(THIS IS EXPERIMENTAL, EXPECT THE OUTPUT FORMAT TO CHANGE!)");

prepare_repo_settings(the_repository);

if (survey_opts.show_progress < 0)
Expand Down

0 comments on commit e0f2860

Please sign in to comment.