Skip to content

Commit ddaec6e

Browse files
dschoGit for Windows Build Agent
authored andcommitted
survey: turn into a thin shim over git repo structure
`git survey` was an experimental scale-measurement tool whose distinctive features (ref-kind filters, top-N path tables) are now all available in `git repo structure`. With the path-level reporting in place (commits "repo: filter the structure scope via --ref-filter=<pattern>" and "repo: report top-N paths by count, disk, and inflated size in structure"), there is no functionality `git survey` provides that `git repo structure` cannot. Replace the 764-line `git survey` implementation with a roughly hundred-line shim that: * Accepts the existing `git survey` command line so callers in scripts continue to parse without changes. * Emits a deprecation warning naming the replacement command, so interactive users learn about the migration target. * Translates the survey-specific knobs into the equivalent `git repo structure` invocation and re-execs the canonical command via `execv_git_cmd()`. Per-kind ref selectors fan out into the corresponding `refs/heads/*`, `refs/tags/*`, etc. `--ref-filter` patterns; `--top=<N>` is forwarded directly; `--all-refs` becomes the absence of any `--ref-filter`. Two survey options have no `git repo structure` counterpart: `--verbose` controlled per-step trace output the new command does not emit, and `--detached` selected the detached HEAD which `git repo structure` does not enumerate separately. Both are silently accepted and produce a single warning each, so old invocations keep working while the absence of these knobs in `git repo structure` is made visible. Rewrite t8100 to assert the shim's contract: the deprecation warning is printed, the output is byte-identical to a corresponding `git repo structure` invocation, and the per-kind selector translation produces the right `--ref-filter` pattern. The preceding survey-specific output assertions (the multi-column plaintext tables) no longer apply, since `git repo structure`'s output format is now the canonical one and is covered by t1901. The `survey.*` configuration keys (`survey.top`, `survey.progress`, `survey.verbose`) are no longer honored by the shim. They were mirrored by the preceding `repo.structure.top` work for the most useful knob; users with `survey.top` set in config should migrate to `repo.structure.top`. This is a backward-incompatible removal documented by the deprecation notice in `git-survey.adoc`. Assisted-by: Opus 4.7 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent 7fed964 commit ddaec6e

3 files changed

Lines changed: 116 additions & 993 deletions

File tree

Documentation/git-survey.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ NOTE: `git survey` is being superseded by `git repo structure`. New
1717
deployments and new features should use `git repo structure`; its
1818
`--ref-filter=<pattern>` option subsumes the various `--branches`,
1919
`--tags`, and `--remotes` flags here, and `--top=<N>` provides the
20-
same detail tables. A future release will turn `git survey` into a
21-
thin shim over `git repo structure`. See linkgit:git-repo[1].
20+
same detail tables. During the deprecation phase, `git survey` is
21+
a thin shim over `git repo structure`. See linkgit:git-repo[1].
2222

2323
Survey the repository and measure various dimensions of scale.
2424

0 commit comments

Comments
 (0)