MCPcopy Create free account
hub / github.com/entireio/git-sync / usageError

Function usageError

cmd/git-sync-bench/main.go:461–467  ·  view source on GitHub ↗
(message string)

Source from the content-addressed store, hash-verified

459}
460
461func usageError(message string) error {
462 usage := fmt.Sprintf("usage:\n %s --source-url <repo> [flags]\n\nflags:\n --scenario bootstrap|sync\n --repeat 3\n --work-dir /tmp/git-sync-bench\n --keep-targets\n --json\n --branch main,release\n --map main:stable\n --tags\n --force-with-lease\n --force-blind\n --prune\n --stats\n --measure-memory\n --max-pack-bytes 104857600\n --target-max-pack-bytes 104857600\n --protocol auto|v1|v2\n -v\n", os.Args[0])
463 if message == "" {
464 return errors.New(strings.TrimSpace(usage))
465 }
466 return fmt.Errorf("%s\n\n%s", message, usage)
467}
468
469type benchProtocolMode gitsync.ProtocolMode
470

Callers 3

runFunction · 0.85
normalizeRepoURLFunction · 0.85
parseScenarioFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected