(cmd *cobra.Command, args []string)
| 37 | ) |
| 38 | |
| 39 | func pruneCommand(cmd *cobra.Command, args []string) { |
| 40 | // Guts of this must be re-usable from fetch --prune so just parse & dispatch |
| 41 | if pruneVerifyArg && pruneDoNotVerifyArg { |
| 42 | Exit(tr.Tr.Get("Cannot specify both --verify-remote and --no-verify-remote")) |
| 43 | } |
| 44 | |
| 45 | fetchPruneConfig := lfs.NewFetchPruneConfig(cfg.Git) |
| 46 | verify := !pruneDoNotVerifyArg && |
| 47 | (fetchPruneConfig.PruneVerifyRemoteAlways || pruneVerifyArg) |
| 48 | verifyUnreachable := !pruneDoNotVerifyUnreachableArg && (pruneVerifyUnreachableArg || fetchPruneConfig.PruneVerifyUnreachableAlways) |
| 49 | |
| 50 | continueWhenUnverified := false |
| 51 | switch pruneWhenUnverifiedArg { |
| 52 | case "halt": |
| 53 | continueWhenUnverified = false |
| 54 | case "continue": |
| 55 | continueWhenUnverified = true |
| 56 | default: |
| 57 | Exit(tr.Tr.Get("Invalid value for --when-unverified: %s", pruneWhenUnverifiedArg)) |
| 58 | } |
| 59 | |
| 60 | fetchPruneConfig.PruneRecent = pruneRecentArg || pruneForceArg |
| 61 | fetchPruneConfig.PruneForce = pruneForceArg |
| 62 | prune(fetchPruneConfig, verify, verifyUnreachable, continueWhenUnverified, pruneDryRunArg, pruneVerboseArg) |
| 63 | } |
| 64 | |
| 65 | type PruneProgressType int |
| 66 |
nothing calls this directly
no test coverage detected