2015-07-10 16:43:20 +00:00
|
|
|
package commands
|
|
|
|
|
|
|
|
import (
|
2015-11-16 20:37:08 +00:00
|
|
|
"fmt"
|
|
|
|
"os"
|
|
|
|
|
2016-05-23 18:02:27 +00:00
|
|
|
"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
|
|
|
|
2016-08-10 15:33:25 +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
|
|
|
}
|
|
|
|
|
2016-08-10 15:33:25 +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() {
|
2016-09-01 16:09:38 +00:00
|
|
|
RegisterCommand("uninit", uninitCommand, func(cmd *cobra.Command) {
|
2016-09-01 14:46:26 +00:00
|
|
|
cmd.AddCommand(NewCommand("hooks", uninitHooksCommand))
|
2016-08-10 15:33:25 +00:00
|
|
|
})
|
2015-07-10 16:43:20 +00:00
|
|
|
}
|