git-lfs/commands/command_update.go
2015-03-19 13:30:55 -06:00

31 lines
583 B
Go

package commands
import (
"github.com/github/git-lfs/lfs"
"github.com/spf13/cobra"
)
var (
updateCmd = &cobra.Command{
Use: "update",
Short: "Update local Git LFS configuration",
Run: updateCommand,
}
)
// updateCommand is used for updating parts of Git LFS that reside under
// .git/lfs.
func updateCommand(cmd *cobra.Command, args []string) {
updatePrePushHook()
}
// updatePrePushHook will force an update of the pre-push hook.
func updatePrePushHook() {
lfs.InstallHooks(true)
Print("Updated pre-push hook")
}
func init() {
RootCmd.AddCommand(updateCmd)
}