3 Star 12 Fork 2

Git工具集/git-lfs

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
command_uninstall.go 1.25 KB
一键复制 编辑 原始数据 按行查看 历史
package commands
import (
"github.com/spf13/cobra"
)
// uninstallCmd removes any configuration and hooks set by Git LFS.
func uninstallCommand(cmd *cobra.Command, args []string) {
if err := cmdInstallOptions().Uninstall(); err != nil {
Error(err.Error())
}
if !skipRepoInstall && (localInstall || cfg.InRepo()) {
uninstallHooksCommand(cmd, args)
}
if systemInstall {
Print("System Git LFS configuration has been removed.")
} else if !localInstall {
Print("Global Git LFS configuration has been removed.")
}
}
// uninstallHooksCmd removes any hooks created by Git LFS.
func uninstallHooksCommand(cmd *cobra.Command, args []string) {
if err := uninstallHooks(); err != nil {
Error(err.Error())
}
Print("Hooks for this repository have been removed.")
}
func init() {
RegisterCommand("uninstall", uninstallCommand, func(cmd *cobra.Command) {
cmd.Flags().BoolVarP(&localInstall, "local", "l", false, "Set the Git LFS config for the local Git repository only.")
cmd.Flags().BoolVarP(&systemInstall, "system", "", false, "Set the Git LFS config in system-wide scope.")
cmd.Flags().BoolVarP(&skipRepoInstall, "skip-repo", "", false, "Skip repo setup, just uninstall global filters.")
cmd.AddCommand(NewCommand("hooks", uninstallHooksCommand))
})
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/vcs-all-in-one/git-lfs.git
git@gitee.com:vcs-all-in-one/git-lfs.git
vcs-all-in-one
git-lfs
git-lfs
master

搜索帮助