sourcegraph/lib/process
Erik Seliger 30f38a5d39
vcssyncer: Move clone implementation details into syncer (#57688)
Today, the doClone method does a bunch of side effects:
Disabling LFS smudge for git, triggering a Perforce changelist mapper, redacting logs assuming all implementations of VCSSyncer have the same kind of potential leakage, and so forth.

This replaces the CloneCommand function on the syncer by a proper Clone method.
It moves the responsibility to the syncer to do the above things (not yet the changelist mapper, because that'll need a bit more refactoring I don't want to do in this PR).
There are two main motivations for this PR:
- Make the cloning process less dependent on the implementation, all we care about is that there's a valid git repo in tmpDir after invocation
- Allow us to (without the dirty hacks we did in packages syncer before where we run the actual command in the getter method and return a bogus command) run multiple steps in the cloning process (which we already implicitly did, just without any visibility). This will enable us to repack an exported perforce depot after successful conversion.

Nice side-effect: The packages syncer feels a little less hacky, too.
2023-10-27 20:55:59 +02:00
..
BUILD.bazel vcssyncer: Move clone implementation details into syncer (#57688) 2023-10-27 20:55:59 +02:00
logger.go sg: Print output, even if it's just one character (#29745) 2022-01-14 13:24:04 +00:00
pipe_test.go lib/process: always pipe _exactly_ what the command outputs (#36574) 2022-06-03 15:13:27 -07:00
pipe.go vcssyncer: Move clone implementation details into syncer (#57688) 2023-10-27 20:55:59 +02:00