From 3c8e64394f3a5c96718e8f2d93dd9b14ce469c9e Mon Sep 17 00:00:00 2001 From: risk danger olson Date: Thu, 23 Feb 2017 13:02:42 -0700 Subject: [PATCH] commands: remove 'matched query' msg --- commands/command_locks.go | 3 --- test/test-locks.sh | 12 ++++++------ 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/commands/command_locks.go b/commands/command_locks.go index 1371438c..c316bb05 100644 --- a/commands/command_locks.go +++ b/commands/command_locks.go @@ -20,7 +20,6 @@ func locksCommand(cmd *cobra.Command, args []string) { lockClient := newLockClient(lockRemote) defer lockClient.Close() - var lockCount int locks, err := lockClient.SearchLocks(filters, locksCmdFlags.Limit, locksCmdFlags.Local) // Print any we got before exiting @@ -33,13 +32,11 @@ func locksCommand(cmd *cobra.Command, args []string) { for _, lock := range locks { Print("%s\t%s", lock.Path, lock.Owner) - lockCount++ } if err != nil { Exit("Error while retrieving locks: %v", err) } - Print("\n%d lock(s) matched query.", lockCount) } // locksFlags wraps up and holds all of the flags that can be given to the diff --git a/test/test-locks.sh b/test/test-locks.sh index 9f1b70eb..8fe50421 100755 --- a/test/test-locks.sh +++ b/test/test-locks.sh @@ -15,7 +15,7 @@ begin_test "list a single lock" assert_server_lock "$reponame" "$id" git lfs locks --path "f.dat" | tee locks.log - grep "1 lock(s) matched query" locks.log + [ $(wc -l < locks.log) -eq 1 ] grep "f.dat" locks.log grep "Git LFS Tests" locks.log ) @@ -69,7 +69,7 @@ begin_test "list locks with a limit" assert_server_lock "$reponame" "$(assert_lock "lock.log" g_2.dat)" git lfs locks --limit 1 | tee locks.log - grep "1 lock(s) matched query" locks.log + [ $(wc -l < locks.log) -eq 1 ] ) end_test @@ -105,7 +105,7 @@ begin_test "list locks with pagination" # The server will return, at most, three locks at a time git lfs locks --limit 4 | tee locks.log - grep "4 lock(s) matched query" locks.log + [ $(wc -l < locks.log) -eq 4 ] ) end_test @@ -138,16 +138,16 @@ begin_test "cached locks" assert_server_lock "$(assert_lock "lock.log" cached2.dat)" git lfs locks --local | tee locks.log - grep "2 lock(s) matched query" locks.log + [ $(wc -l < locks.log) -eq 2 ] # delete the remote to prove we're using the local records git remote remove origin git lfs locks --local --path "cached1.dat" | tee locks.log - grep "1 lock(s) matched query" locks.log + [ $(wc -l < locks.log) -eq 1 ] grep "cached1.dat" locks.log git lfs locks --local --limit 1 | tee locks.log - grep "1 lock(s) matched query" locks.log + [ $(wc -l < locks.log) -eq 1 ] ) end_test