commands: remove 'matched query' msg

This commit is contained in:
risk danger olson 2017-02-23 13:02:42 -07:00
parent d292a19f51
commit 3c8e64394f
2 changed files with 6 additions and 9 deletions

@ -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

@ -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