From c1afb37a4eaf151ae0b1c5798d73f271c1d98165 Mon Sep 17 00:00:00 2001 From: rubyist Date: Fri, 30 Jan 2015 10:41:03 -0500 Subject: [PATCH] Rename the command --- cmd/{git-media.go => git-hawser.go} | 0 commands/command_init.go | 2 +- commands/commands.go | 4 ++-- commands/commands_test.go | 4 ++-- commands/init_test.go | 8 ++++---- gitmedia/setup.go | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) rename cmd/{git-media.go => git-hawser.go} (100%) diff --git a/cmd/git-media.go b/cmd/git-hawser.go similarity index 100% rename from cmd/git-media.go rename to cmd/git-hawser.go diff --git a/commands/command_init.go b/commands/command_init.go index 388162db..0fd36788 100644 --- a/commands/command_init.go +++ b/commands/command_init.go @@ -28,7 +28,7 @@ func initCommand(cmd *cobra.Command, args []string) { initHooksCommand(cmd, args) } - Print("git media initialized") + Print("git hawser initialized") } func initHooksCommand(cmd *cobra.Command, args []string) { diff --git a/commands/commands.go b/commands/commands.go index fc5f7dcd..10052bb2 100644 --- a/commands/commands.go +++ b/commands/commands.go @@ -20,8 +20,8 @@ var ( ErrorWriter = io.MultiWriter(os.Stderr, ErrorBuffer) OutputWriter = io.MultiWriter(os.Stdout, ErrorBuffer) RootCmd = &cobra.Command{ - Use: "git-media", - Short: "Git Media provides large file support to Git.", + Use: "git-hawser", + Short: "Hawser provides large file support to Git.", Run: func(cmd *cobra.Command, args []string) { versionCommand(cmd, args) cmd.Usage() diff --git a/commands/commands_test.go b/commands/commands_test.go index c1f94caa..b4f4b182 100644 --- a/commands/commands_test.go +++ b/commands/commands_test.go @@ -149,7 +149,7 @@ type TestCommand struct { } func (c *TestCommand) Run(path string) { - fmt.Println("$ git media", strings.Join(c.Args, " ")) + fmt.Println("$ git hawser", strings.Join(c.Args, " ")) for _, cb := range c.BeforeCallbacks { cb() @@ -231,7 +231,7 @@ func init() { } Root = filepath.Join(wd, "..") - Bin = filepath.Join(Root, "bin", "git-media") + Bin = filepath.Join(Root, "bin", "git-hawser") TempDir = filepath.Join(os.TempDir(), "git-media-tests") env := os.Environ() diff --git a/commands/init_test.go b/commands/init_test.go index 92c65586..fda5915f 100644 --- a/commands/init_test.go +++ b/commands/init_test.go @@ -17,7 +17,7 @@ func TestInit(t *testing.T) { repo.AddPath(repo.Path, "subdir") cmd := repo.Command("init") - cmd.Output = "git media initialized" + cmd.Output = "git hawser initialized" prePushHookFile := filepath.Join(repo.Path, ".git", "hooks", "pre-push") @@ -29,8 +29,8 @@ func TestInit(t *testing.T) { cmd.After(func() { // assert media filter config configs := GlobalGitConfig(t) - AssertIncludeString(t, "filter.media.clean=git media clean %f", configs) - AssertIncludeString(t, "filter.media.smudge=git media smudge %f", configs) + AssertIncludeString(t, "filter.media.clean=git hawser clean %f", configs) + AssertIncludeString(t, "filter.media.smudge=git hawser smudge %f", configs) AssertIncludeString(t, "filter.media.required=true", configs) found := 0 for _, line := range configs { @@ -47,7 +47,7 @@ func TestInit(t *testing.T) { }) cmd = repo.Command("init") - cmd.Output = "Hook already exists: pre-push\ngit media initialized" + cmd.Output = "Hook already exists: pre-push\ngit hawser initialized" customHook := []byte("echo 'yo'") cmd.Before(func() { diff --git a/gitmedia/setup.go b/gitmedia/setup.go index fc8bbb4c..f46ededb 100644 --- a/gitmedia/setup.go +++ b/gitmedia/setup.go @@ -56,7 +56,7 @@ func InstallFilters() error { func setFilter(filterName string) error { key := fmt.Sprintf("filter.media.%s", filterName) - value := fmt.Sprintf("git media %s %%f", filterName) + value := fmt.Sprintf("git hawser %s %%f", filterName) existing := git.Config.Find(key) if shouldReset(existing) {