git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2] t4150: fix broken test for am --scissors

From
Andrei Rybak <rybak.a.v@gmail.com>
Date
Aug 6, 2018, 17:42 UTC
Message-ID
<a50da318-1f15-3dc8-53e0-c40365a053f7@gmail.com>
In-Reply-To
<CACRoPnTWxYvGfqgGt2r5ETOhfJZnqr1fTO9Fzwp-u25XbMGPPQ@mail.gmail.com>
On 2018-08-06 10:58, Paul Tan wrote:
Show 12 quoted lines
>> +       git commit -F msg-without-scissors-line &&
>> +       git tag scissors-used &&
> 
> Nit: I'm not quite sure about naming the tag "scissors-used" though,
> since this commit was not created from the output of "git am
> --scissors". Maybe it should be named `commit-without-scissors-line`
> or something?
> 
>> +       git commit -F msg-with-scissors-line &&
>> +       git tag scissors-not-used &&
> 
> Nit: Likewise, perhaps this tag could be named `commit-with-scissors-line`?

How about "expected-for-scissors" and "expected-for-no-scissors"? Junio, I'll send out v3 with updated tag names, if that's OK. Also, squash-able patch below.

> So, this patch fixes the 3 problems with the tests, and so looks correct to me.
Thank you for such thorough review.
--- 8< ---
From: Andrei Rybak <rybak.a.v@gmail.com>
Date: Mon, 6 Aug 2018 19:29:03 +0200
Subject: [PATCH] squash! t4150: fix broken test for am --scissors
clarify tag names
---
 t/t4150-am.sh | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/t/t4150-am.sh b/t/t4150-am.sh
index bb2d951a70..a821dfda54 100755
--- a/t/t4150-am.sh
+++ b/t/t4150-am.sh
@@ -155,14 +155,14 @@ test_expect_success setup '
 	echo file >file &&
 	git add file &&
 	git commit -F msg-without-scissors-line &&
-	git tag scissors-used &&
+	git tag expected-for-scissors &&
 	git reset --hard HEAD^ &&
 
 	echo file >file &&
 	git add file &&
 	git commit -F msg-with-scissors-line &&
-	git tag scissors-not-used &&
-	git format-patch --stdout scissors-not-used^ >patch-with-scissors-line.eml &&
+	git tag expected-for-no-scissors &&
+	git format-patch --stdout expected-for-no-scissors^ >patch-with-scissors-line.eml &&
 	git reset --hard HEAD^ &&
 
 	sed -n -e "3,\$p" msg >file &&
@@ -421,8 +421,8 @@ test_expect_success 'am --scissors cuts the message at the scissors line' '
 	git checkout second &&
 	git am --scissors patch-with-scissors-line.eml &&
 	test_path_is_missing .git/rebase-apply &&
-	git diff --exit-code scissors-used &&
-	test_cmp_rev scissors-used HEAD
+	git diff --exit-code expected-for-scissors &&
+	test_cmp_rev expected-for-scissors HEAD
 '
 
 test_expect_success 'am --no-scissors overrides mailinfo.scissors' '
@@ -432,8 +432,8 @@ test_expect_success 'am --no-scissors overrides mailinfo.scissors' '
 	test_config mailinfo.scissors true &&
 	git am --no-scissors patch-with-scissors-line.eml &&
 	test_path_is_missing .git/rebase-apply &&
-	git diff --exit-code scissors-not-used &&
-	test_cmp_rev scissors-not-used HEAD
+	git diff --exit-code expected-for-no-scissors &&
+	test_cmp_rev expected-for-no-scissors HEAD
 '
 
 test_expect_success 'setup: new author and committer' '
-- 
2.18.0
Previous: Junio C HamanoNext: Paul Tan
Message 8 of 12 in “[RFC] broken test for git am --scissors”
  1. Andrei RybakAug 3, 2018
  2. t4150: fix broken test for am --scissorsAndrei Rybak, Aug 3, 2018
  3. Junio C HamanoAug 3, 2018
  4. Andrei RybakAug 4, 2018
  5. t4150: fix broken test for am --scissorsAndrei Rybak, Aug 4, 2018
  6. Paul TanAug 6, 2018
  7. Junio C HamanoAug 6, 2018
  8. Andrei RybakAug 6, 2018
  9. Paul TanAug 7, 2018
  10. t4150: fix broken test for am --scissorsAndrei Rybak, Aug 6, 2018
  11. Junio C HamanoAug 6, 2018
  12. Andrei RybakAug 7, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.