MCPcopy
hub / github.com/git-lfs/git-lfs / dedupTestCommand

Function dedupTestCommand

commands/command_dedup.go:27–42  ·  view source on GitHub ↗
(*cobra.Command, []string)

Source from the content-addressed store, hash-verified

25)
26
27func dedupTestCommand(*cobra.Command, []string) {
28 setupRepository()
29
30 if supported, err := tools.CheckCloneFileSupported(cfg.TempDir()); err != nil || !supported {
31 if err == nil {
32 err = errors.New(tr.Tr.Get("Unknown reason"))
33 }
34 Exit(tr.Tr.Get("This system does not support de-duplication: %s", err))
35 }
36
37 if len(cfg.Extensions()) > 0 {
38 Exit(tr.Tr.Get("This platform supports file de-duplication, however, Git LFS extensions are configured and therefore de-duplication can not be used."))
39 }
40
41 Print(tr.Tr.Get("OK: This platform and repository support file de-duplication."))
42}
43
44func dedupCommand(cmd *cobra.Command, args []string) {
45 if dedupFlags.test {

Callers 1

dedupCommandFunction · 0.85

Calls 8

CheckCloneFileSupportedFunction · 0.92
NewFunction · 0.92
setupRepositoryFunction · 0.85
ExitFunction · 0.85
PrintFunction · 0.85
ExtensionsMethod · 0.80
GetMethod · 0.65
TempDirMethod · 0.45

Tested by

no test coverage detected