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

Function installCommand

commands/command_install.go:23–35  ·  view source on GitHub ↗
(cmd *cobra.Command, args []string)

Source from the content-addressed store, hash-verified

21)
22
23func installCommand(cmd *cobra.Command, args []string) {
24 if err := cmdInstallOptions().Install(); err != nil {
25 Print(tr.Tr.Get("warning: %s", err.Error()))
26 Print(tr.Tr.Get("Run `git lfs install --force` to reset Git configuration."))
27 os.Exit(2)
28 }
29
30 if !skipRepoInstall && (localInstall || worktreeInstall || cfg.InRepo()) {
31 installHooksCommand(cmd, args)
32 }
33
34 Print(tr.Tr.Get("Git LFS initialized."))
35}
36
37func cmdInstallOptions() *lfs.FilterOptions {
38 requireGitVersion()

Callers

nothing calls this directly

Calls 7

cmdInstallOptionsFunction · 0.85
PrintFunction · 0.85
installHooksCommandFunction · 0.85
InRepoMethod · 0.80
GetMethod · 0.65
ErrorMethod · 0.65
InstallMethod · 0.45

Tested by

no test coverage detected