git-lfs/commands/command_uninit.go

38 lines
885 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
)
2015-11-16 23:40:33 +00:00
// TODO: Remove for Git LFS v2.0 https://github.com/github/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() {
RegisterSubcommand(func() *cobra.Command {
cmd := &cobra.Command{
Use: "uninit",
Run: uninitCommand,
}
cmd.AddCommand(&cobra.Command{
Use: "hooks",
Run: uninitHooksCommand,
})
return cmd
})
2015-07-10 16:43:20 +00:00
}