Skip to content

Commit b6b41c9

Browse files
jeffhostetlerderrickstolee
authored andcommitted
t5799: cleanup wc-l and grep-c lines
Signed-off-by: Jeff Hostetler <[email protected]>
1 parent 23ae7c8 commit b6b41c9

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

t/t5799-gvfs-helper.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ get_list_of_oids () {
7373

7474
if test $# -eq 1
7575
then
76-
actual_nr=$(( $(wc -l <"$OIDS_FILE") ))
76+
actual_nr=$(wc -l <"$OIDS_FILE")
7777
if test $actual_nr -lt $1
7878
then
7979
echo "get_list_of_oids: insufficient data. Need $1 OIDs."
@@ -93,7 +93,7 @@ get_list_of_commit_and_tree_oids () {
9393

9494
if test $# -eq 1
9595
then
96-
actual_nr=$(( $(wc -l <"$OIDS_CT_FILE") ))
96+
actual_nr=$(wc -l <"$OIDS_CT_FILE")
9797
if test $actual_nr -lt $1
9898
then
9999
echo "get_list_of_commit_and_tree_oids: insufficient data. Need $1 OIDs."
@@ -122,6 +122,8 @@ test_expect_success 'setup repos' '
122122
# test_commit() creates commits, trees, tags, and blobs and leave
123123
# them loose.
124124
#
125+
test_config gc.auto 0 &&
126+
#
125127
test_commit -C "$REPO_SRC" file1.txt &&
126128
test_commit -C "$REPO_SRC" file2.txt &&
127129
test_commit -C "$REPO_SRC" file3.txt &&
@@ -286,7 +288,7 @@ verify_connection_count () {
286288
expected_nr=1
287289
fi
288290

289-
actual_nr=$(( $(grep "Connection from" "$SERVER_LOG" | wc -l) ))
291+
actual_nr=$(grep -c "Connection from" "$SERVER_LOG")
290292

291293
if test $actual_nr -ne $expected_nr
292294
then
@@ -337,7 +339,7 @@ verify_received_packfile_count () {
337339
expected_nr=1
338340
fi
339341

340-
actual_nr=$(( $(grep "packfile " OUT.output | wc -l) ))
342+
actual_nr=$(grep -c "packfile " <OUT.output)
341343

342344
if test $actual_nr -ne $expected_nr
343345
then

0 commit comments

Comments
 (0)