diff mbox series

[v3,3/6,Newcomer] t7004-tag: one command per line

Message ID 20240804071137.30326-4-abdobngad@gmail.com (mailing list archive)
State Superseded
Headers show
Series t7004: modernize the style | expand

Commit Message

AbdAlRahman Gad Aug. 4, 2024, 7:11 a.m. UTC
fix lines like these:

git tag -l >actual && test_cmp expect actual &&

to

git tag -l >actual &&
test_cmp expect actual &&

Signed-off-by: AbdAlRahman Gad <abdobngad@gmail.com>
---
 t/t7004-tag.sh | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Patrick Steinhardt Aug. 5, 2024, 9:36 a.m. UTC | #1
On Sun, Aug 04, 2024 at 10:11:34AM +0300, AbdAlRahman Gad wrote:
> fix lines like these:
> 
> git tag -l >actual && test_cmp expect actual &&
> 
> to
> 
> git tag -l >actual &&
> test_cmp expect actual &&

Same remark here regarding the style of this commit message. I also
think that the message is both overly verbose and not telling enough at
the same point in time, because you require the reader to implicitly
derive what the change is that you are doing. Proposal:

    One of the tests in t7004 has multiple commands on a single line,
    which is discouraged. Adapt these by splitting up these into one
    line per command.

Patrick
diff mbox series

Patch

diff --git a/t/t7004-tag.sh b/t/t7004-tag.sh
index 1e31f39646..cfe7653317 100755
--- a/t/t7004-tag.sh
+++ b/t/t7004-tag.sh
@@ -215,9 +215,11 @@  mytag
 EOF
 test_expect_success \
 	'trying to delete tags without params should succeed and do nothing' '
-	git tag -l >actual && test_cmp expect actual &&
+	git tag -l >actual &&
+	test_cmp expect actual &&
 	git tag -d &&
-	git tag -l >actual && test_cmp expect actual
+	git tag -l >actual &&
+	test_cmp expect actual
 '
 
 test_expect_success \