From 68da2113044d57d84bc128e44302f01af14ecff2 Mon Sep 17 00:00:00 2001 From: Taylor Blau Date: Wed, 18 Apr 2018 15:21:59 -0700 Subject: [PATCH] commands/uninstall: do not log about global hooks with --local --- commands/command_uninstall.go | 4 +++- test/test-uninstall.sh | 7 ++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/commands/command_uninstall.go b/commands/command_uninstall.go index b27336cc..bdea8267 100644 --- a/commands/command_uninstall.go +++ b/commands/command_uninstall.go @@ -14,7 +14,9 @@ func uninstallCommand(cmd *cobra.Command, args []string) { uninstallHooksCommand(cmd, args) } - Print("Global Git LFS configuration has been removed.") + if !localInstall { + Print("Global Git LFS configuration has been removed.") + } } // uninstallHooksCmd removes any hooks created by Git LFS. diff --git a/test/test-uninstall.sh b/test/test-uninstall.sh index 4d588bc0..82b07346 100755 --- a/test/test-uninstall.sh +++ b/test/test-uninstall.sh @@ -169,7 +169,12 @@ begin_test "uninstall --local" [ "global clean" = "$(git config --global filter.lfs.clean)" ] [ "global filter" = "$(git config --global filter.lfs.process)" ] - git lfs uninstall --local + git lfs uninstall --local 2>&1 | tee uninstall.log + if [ ${PIPESTATUS[0]} -ne 0 ]; then + echo >&2 "fatal: expected 'git lfs uninstall --local' to succeed" + exit 1 + fi + grep -v "Global Git LFS configuration has been removed." uninstall.log # global configs [ "global smudge" = "$(git config --global filter.lfs.smudge)" ]