git-lfs/commands/command_uninit.go

40 lines
902 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
2015-07-10 16:43:20 +00:00
var (
// uninitCmd removes any configuration and hooks set by Git LFS.
2015-07-10 16:43:20 +00:00
uninitCmd = &cobra.Command{
2015-09-17 22:08:28 +00:00
Use: "uninit",
Run: uninitCommand,
2015-07-10 16:43:20 +00:00
}
// uninitHooksCmd removes any hooks created by Git LFS.
2015-07-10 16:43:20 +00:00
uninitHooksCmd = &cobra.Command{
2015-09-17 22:08:28 +00:00
Use: "hooks",
Run: uninitHooksCommand,
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
}
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() {
uninitCmd.AddCommand(uninitHooksCmd)
RootCmd.AddCommand(uninitCmd)
}