Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH 3/4] Clean: Remove unnecessary `\' (line continuation)

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:50:56

Michael Witten [off-list ref] writes:
quoted hunk
Signed-off-by: Michael Witten <redacted>
---
 t/t8001-annotate.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/t/t8001-annotate.sh b/t/t8001-annotate.sh
index 45cb60e..68ac828 100755
--- a/t/t8001-annotate.sh
+++ b/t/t8001-annotate.sh
@@ -8,7 +8,7 @@ PROG='git annotate'
 
 test_expect_success \
     'Annotating an old revision works' \
-    '[ $(git annotate file master | awk "{print \$3}" | grep -c "^A$") -eq 2 ] && \
+    '[ $(git annotate file master | awk "{print \$3}" | grep -c "^A$") -eq 2 ] &&
      [ $(git annotate file master | awk "{print \$3}" | grep -c "^B$") -eq 2 ]'
While this is not wrong per-se, I don't want to take too much half-way
churning.

If we were to properly do this, we should first rewrite it to use the more
modern style:

	test_expect_success 'Annotating an old revision works' '
		... test script comes here ...
        '

and just run annotate once without having any downstream pipe, i.e.

	git annotate file master >result &&
	awk "{ print \$3; }" <result >authors &&
	test 2 = $(grep A <authors | wc -l) &&
	test 2 = $(grep B <authors | wc -l)

so that we can catch breakage in "git annotate" itself more reliably
(e.g. even if the command showed two lines for each author, it is a
failure if the command itself did not exit with status 0).
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help