git-lfs/commands/command_uninit.go

29 lines
802 B
Go
Raw Normal View History

2015-07-10 16:43:20 +00:00
package commands
import (
2015-11-16 20:37:08 +00:00
"fmt"
"os"
"github.com/spf13/cobra"
2015-07-10 16:43:20 +00:00
)
2016-11-15 17:07:11 +00:00
// TODO: Remove for Git LFS v2.0 https://github.com/git-lfs/git-lfs/issues/839
2015-11-16 20:39:58 +00:00
// uninitCmd removes any configuration and hooks set by Git LFS.
2015-07-10 16:43:20 +00:00
func uninitCommand(cmd *cobra.Command, args []string) {
2015-11-16 20:37:08 +00:00
fmt.Fprintf(os.Stderr, "WARNING: 'git lfs uninit' is deprecated. Use 'git lfs uninstall' now.\n")
uninstallCommand(cmd, args)
2015-07-10 16:43:20 +00:00
}
// uninitHooksCmd removes any hooks created by Git LFS.
2015-07-10 16:43:20 +00:00
func uninitHooksCommand(cmd *cobra.Command, args []string) {
2015-11-16 20:37:08 +00:00
fmt.Fprintf(os.Stderr, "WARNING: 'git lfs uninit' is deprecated. Use 'git lfs uninstall' now.\n")
uninstallHooksCommand(cmd, args)
2015-07-10 16:43:20 +00:00
}
func init() {
RegisterCommand("uninit", uninitCommand, func(cmd *cobra.Command) {
cmd.AddCommand(NewCommand("hooks", uninitHooksCommand))
})
2015-07-10 16:43:20 +00:00
}