From patchwork Sat Aug 24 08:26:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Denton Liu X-Patchwork-Id: 11112927 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3556E14E5 for ; Sat, 24 Aug 2019 08:27:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 08BA22146E for ; Sat, 24 Aug 2019 08:27:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bJyUJVGa" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726518AbfHXI0x (ORCPT ); Sat, 24 Aug 2019 04:26:53 -0400 Received: from mail-io1-f49.google.com ([209.85.166.49]:42381 "EHLO mail-io1-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725930AbfHXI0w (ORCPT ); Sat, 24 Aug 2019 04:26:52 -0400 Received: by mail-io1-f49.google.com with SMTP id e20so25543263iob.9 for ; Sat, 24 Aug 2019 01:26:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=cn5jFarKJ6VpDNdkWy0N5jDxwa8FQX6TLwwg9G5+5dY=; b=bJyUJVGaIktYNQpfw13NnI+oDRp/NsRc8vG6e1UUjKpm80Ne5lTCBztGu4bv7AXOOw krHyQ+62jcj/2dUx2V42s0DgH9JRkS+6U0E9hjUvPUpOyddti6pT5ZV7eruWZ4fDHm5J o7V1oNVQBEzffoKDv0EdWxFqOTC8Msh3NoIMlGHQRAC4KbX8CzCfyuSA+fUSAFkC1NKC alMR2UClq5N0T5BEh8XkAafdpvwPfBND4WIQICRj64C3L5n+MNUwZjgDlUOdbGkGn4vs Nz2WQY1WenJcemNrSK5AJbTL/jXHHBPnng3UfzKe47F65q00At5VLUT32kgcVSTTeVmD k1vQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=cn5jFarKJ6VpDNdkWy0N5jDxwa8FQX6TLwwg9G5+5dY=; b=e1MVb70XvoG6PWCTDRs4PI3cyeipp2anH03XspQ75y5A6dPvDZ2x1DHbG+NtaIXOXP S6+m6nxcft0jxmrgZL8ntwDy08h+Aw5trCwg9EA6lRxNCZBiWwVXg4ql/oJjdEQDxjqX U8OCjaVaP8mAOjHMCLDWOWQ5sCeERMO4Tm2h+XFACDOtRsdmtU8tgmPJfOcOn73Vlqr3 T+v0DtQlOa8DtJl274bASq57JfTmRmtnH6kvrnJtAUCdXvKNSAkK/XWnR330oMbXzPlF zgSVohuF9ojSs7L+h4M3hUSggHu1ePgLnWNjPv/wvNwqwxkpjAJjSVZcm6smeNgrmJr3 /xqg== X-Gm-Message-State: APjAAAUYDopDdA+FQ0O82QYFG07oDOtfICNT9ym2iWMKTG5E7sZwq+D5 hDz1SFWSo2DCTOO3SZbNQkOoltKM X-Google-Smtp-Source: APXvYqzdu+7J2nwbmcCOxAmbFDNxRr+W3JYpMh1szP82tULVz7bBb9dnElERks+u6q9pFWbGQp1C7w== X-Received: by 2002:a5d:9d89:: with SMTP id 9mr11655770ion.212.1566635211497; Sat, 24 Aug 2019 01:26:51 -0700 (PDT) Received: from archbookpro.localdomain (CPE18593399858a-CM185933998587.cpe.net.cable.rogers.com. [174.112.89.95]) by smtp.gmail.com with ESMTPSA id s4sm7073758iop.25.2019.08.24.01.26.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Aug 2019 01:26:51 -0700 (PDT) Date: Sat, 24 Aug 2019 04:26:49 -0400 From: Denton Liu To: Git Mailing List Cc: =?iso-8859-1?q?=C6var_Arnfj=F6r=F0?= Bjarmason , Junio C Hamano , Eric Sunshine , Johannes Sixt , Philip Oakley Subject: [PATCH 01/13] t4014: drop unnecessary blank lines from test cases Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Signed-off-by: Denton Liu --- t/t4014-format-patch.sh | 47 ----------------------------------------- 1 file changed, 47 deletions(-) diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh index ca7debf1d4..3ed3feabfe 100755 --- a/t/t4014-format-patch.sh +++ b/t/t4014-format-patch.sh @@ -9,7 +9,6 @@ test_description='various format-patch tests' . "$TEST_DIRECTORY"/lib-terminal.sh test_expect_success setup ' - for i in 1 2 3 4 5 6 7 8 9 10; do echo "$i"; done >file && cat file >elif && git add file elif && @@ -60,20 +59,16 @@ test_expect_success setup ' ' test_expect_success "format-patch --ignore-if-in-upstream" ' - git format-patch --stdout master..side >patch0 && cnt=$(grep "^From " patch0 | wc -l) && test $cnt = 3 - ' test_expect_success "format-patch --ignore-if-in-upstream" ' - git format-patch --stdout \ --ignore-if-in-upstream master..side >patch1 && cnt=$(grep "^From " patch1 | wc -l) && test $cnt = 2 - ' test_expect_success "format-patch --ignore-if-in-upstream handles tags" ' @@ -85,7 +80,6 @@ test_expect_success "format-patch --ignore-if-in-upstream handles tags" ' ' test_expect_success "format-patch doesn't consider merge commits" ' - git checkout -b slave master && echo "Another line" >>file && test_tick && @@ -101,7 +95,6 @@ test_expect_success "format-patch doesn't consider merge commits" ' ' test_expect_success "format-patch result applies" ' - git checkout -b rebuild-0 master && git am -3 patch0 && cnt=$(git rev-list master.. | wc -l) && @@ -109,7 +102,6 @@ test_expect_success "format-patch result applies" ' ' test_expect_success "format-patch --ignore-if-in-upstream result applies" ' - git checkout -b rebuild-1 master && git am -3 patch1 && cnt=$(git rev-list master.. | wc -l) && @@ -117,26 +109,19 @@ test_expect_success "format-patch --ignore-if-in-upstream result applies" ' ' test_expect_success 'commit did not screw up the log message' ' - git cat-file commit side | grep "^Side .* with .* backslash-n" - ' test_expect_success 'format-patch did not screw up the log message' ' - grep "^Subject: .*Side changes #3 with .* backslash-n" patch0 && grep "^Subject: .*Side changes #3 with .* backslash-n" patch1 - ' test_expect_success 'replay did not screw up the log message' ' - git cat-file commit rebuild-1 | grep "^Side .* with .* backslash-n" - ' test_expect_success 'extra headers' ' - git config format.headers "To: R E Cipient " && git config --add format.headers "Cc: S E Cipient @@ -145,22 +130,18 @@ test_expect_success 'extra headers' ' sed -e "/^\$/q" patch2 > hdrs2 && grep "^To: R E Cipient \$" hdrs2 && grep "^Cc: S E Cipient \$" hdrs2 - ' test_expect_success 'extra headers without newlines' ' - git config --replace-all format.headers "To: R E Cipient " && git config --add format.headers "Cc: S E Cipient " && git format-patch --stdout master..side >patch3 && sed -e "/^\$/q" patch3 > hdrs3 && grep "^To: R E Cipient \$" hdrs3 && grep "^Cc: S E Cipient \$" hdrs3 - ' test_expect_success 'extra headers with multiple To:s' ' - git config --replace-all format.headers "To: R E Cipient " && git config --add format.headers "To: S E Cipient " && git format-patch --stdout master..side > patch4 && @@ -170,7 +151,6 @@ test_expect_success 'extra headers with multiple To:s' ' ' test_expect_success 'additional command line cc (ascii)' ' - git config --replace-all format.headers "Cc: R E Cipient " && git format-patch --cc="S E Cipient " --stdout master..side | sed -e "/^\$/q" >patch5 && grep "^Cc: R E Cipient ,\$" patch5 && @@ -178,7 +158,6 @@ test_expect_success 'additional command line cc (ascii)' ' ' test_expect_failure 'additional command line cc (rfc822)' ' - git config --replace-all format.headers "Cc: R E Cipient " && git format-patch --cc="S. E. Cipient " --stdout master..side | sed -e "/^\$/q" >patch5 && grep "^Cc: R E Cipient ,\$" patch5 && @@ -186,14 +165,12 @@ test_expect_failure 'additional command line cc (rfc822)' ' ' test_expect_success 'command line headers' ' - git config --unset-all format.headers && git format-patch --add-header="Cc: R E Cipient " --stdout master..side | sed -e "/^\$/q" >patch6 && grep "^Cc: R E Cipient \$" patch6 ' test_expect_success 'configuration headers and command line headers' ' - git config --replace-all format.headers "Cc: R E Cipient " && git format-patch --add-header="Cc: S E Cipient " --stdout master..side | sed -e "/^\$/q" >patch7 && grep "^Cc: R E Cipient ,\$" patch7 && @@ -201,40 +178,34 @@ test_expect_success 'configuration headers and command line headers' ' ' test_expect_success 'command line To: header (ascii)' ' - git config --unset-all format.headers && git format-patch --to="R E Cipient " --stdout master..side | sed -e "/^\$/q" >patch8 && grep "^To: R E Cipient \$" patch8 ' test_expect_failure 'command line To: header (rfc822)' ' - git format-patch --to="R. E. Cipient " --stdout master..side | sed -e "/^\$/q" >patch8 && grep "^To: \"R. E. Cipient\" \$" patch8 ' test_expect_failure 'command line To: header (rfc2047)' ' - git format-patch --to="R Ä Cipient " --stdout master..side | sed -e "/^\$/q" >patch8 && grep "^To: =?UTF-8?q?R=20=C3=84=20Cipient?= \$" patch8 ' test_expect_success 'configuration To: header (ascii)' ' - git config format.to "R E Cipient " && git format-patch --stdout master..side | sed -e "/^\$/q" >patch9 && grep "^To: R E Cipient \$" patch9 ' test_expect_failure 'configuration To: header (rfc822)' ' - git config format.to "R. E. Cipient " && git format-patch --stdout master..side | sed -e "/^\$/q" >patch9 && grep "^To: \"R. E. Cipient\" \$" patch9 ' test_expect_failure 'configuration To: header (rfc2047)' ' - git config format.to "R Ä Cipient " && git format-patch --stdout master..side | sed -e "/^\$/q" >patch9 && grep "^To: =?UTF-8?q?R=20=C3=84=20Cipient?= \$" patch9 @@ -249,7 +220,6 @@ check_patch () { } test_expect_success 'format.from=false' ' - git -c format.from=false format-patch --stdout master..side | sed -e "/^\$/q" >patch && check_patch patch && @@ -257,7 +227,6 @@ test_expect_success 'format.from=false' ' ' test_expect_success 'format.from=true' ' - git -c format.from=true format-patch --stdout master..side | sed -e "/^\$/q" >patch && check_patch patch && @@ -265,7 +234,6 @@ test_expect_success 'format.from=true' ' ' test_expect_success 'format.from with address' ' - git -c format.from="F R Om " format-patch --stdout master..side | sed -e "/^\$/q" >patch && check_patch patch && @@ -273,7 +241,6 @@ test_expect_success 'format.from with address' ' ' test_expect_success '--no-from overrides format.from' ' - git -c format.from="F R Om " format-patch --no-from --stdout master..side | sed -e "/^\$/q" >patch && check_patch patch && @@ -281,7 +248,6 @@ test_expect_success '--no-from overrides format.from' ' ' test_expect_success '--from overrides format.from' ' - git -c format.from="F R Om " format-patch --from --stdout master..side | sed -e "/^\$/q" >patch && check_patch patch && @@ -289,7 +255,6 @@ test_expect_success '--from overrides format.from' ' ' test_expect_success '--no-to overrides config.to' ' - git config --replace-all format.to \ "R E Cipient " && git format-patch --no-to --stdout master..side | @@ -299,7 +264,6 @@ test_expect_success '--no-to overrides config.to' ' ' test_expect_success '--no-to and --to replaces config.to' ' - git config --replace-all format.to \ "Someone " && git format-patch --no-to --to="Someone Else " \ @@ -311,7 +275,6 @@ test_expect_success '--no-to and --to replaces config.to' ' ' test_expect_success '--no-cc overrides config.cc' ' - git config --replace-all format.cc \ "C E Cipient " && git format-patch --no-cc --stdout master..side | @@ -321,7 +284,6 @@ test_expect_success '--no-cc overrides config.cc' ' ' test_expect_success '--no-add-header overrides config.headers' ' - git config --replace-all format.headers \ "Header1: B E Cipient " && git format-patch --no-add-header --stdout master..side | @@ -331,7 +293,6 @@ test_expect_success '--no-add-header overrides config.headers' ' ' test_expect_success 'multiple files' ' - rm -rf patches/ && git checkout side && git format-patch -o patches/ master && @@ -594,7 +555,6 @@ test_expect_success 'thread config + --no-thread' ' ' test_expect_success 'excessive subject' ' - rm -rf patches/ && git checkout side && before=$(git hash-object file) && @@ -622,7 +582,6 @@ test_expect_success 'cover-letter inherits diff options' ' ! grep "file => foo .* 0 *\$" 0000-cover-letter.patch && git format-patch --cover-letter -1 -M && grep "file => foo .* 0 *\$" 0000-cover-letter.patch - ' cat > expect << EOF @@ -636,11 +595,9 @@ cat > expect << EOF EOF test_expect_success 'shortlog of cover-letter wraps overly-long onelines' ' - git format-patch --cover-letter -2 && sed -e "1,/A U Thor/d" -e "/^\$/q" < 0000-cover-letter.patch > output && test_cmp expect output - ' cat > expect << EOF @@ -656,13 +613,11 @@ index $before..$after 100644 EOF test_expect_success 'format-patch respects -U' ' - git format-patch -U4 -2 && sed -e "1,/^diff/d" -e "/^+5/q" \ <0001-This-is-an-excessively-long-subject-line-for-a-messa.patch \ >output && test_cmp expect output - ' cat > expect << EOF @@ -679,11 +634,9 @@ index $before..$after 100644 EOF test_expect_success 'format-patch -p suppresses stat' ' - git format-patch -p -2 && sed -e "1,/^\$/d" -e "/^+5/q" < 0001-This-is-an-excessively-long-subject-line-for-a-messa.patch > output && test_cmp expect output - ' test_expect_success 'format-patch from a subdirectory (1)' ' From patchwork Sat Aug 24 08:26:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denton Liu X-Patchwork-Id: 11112929 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 61E3E14DE for ; Sat, 24 Aug 2019 08:27:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3E1342146E for ; Sat, 24 Aug 2019 08:27:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="skex4mUG" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726927AbfHXI0z (ORCPT ); Sat, 24 Aug 2019 04:26:55 -0400 Received: from mail-io1-f66.google.com ([209.85.166.66]:43879 "EHLO mail-io1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726723AbfHXI0z (ORCPT ); Sat, 24 Aug 2019 04:26:55 -0400 Received: by mail-io1-f66.google.com with SMTP id 18so25574937ioe.10 for ; Sat, 24 Aug 2019 01:26:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=9jrIbzWvoCYQgcJJyNCDCfNj2pQFwhu4pOWaG2kaKbQ=; b=skex4mUGrcE+XM8Lst5HskYLF6cOw9UCtIo1pSmo0xHmOVOHtKkMdxMwUTIfKfVYqQ 6hldm/YhCkyTquglDVo1U12h1g7h12bG+FLUy1MivmYwdqFUGR9J1gUohE/UeSbd0sno dqjrg4ALH5HtiBAkgjWcOuN6IPHanY77O7R7eWPRu7vOka3krwaCFOiyGEukIawKJ47Z oUEk57Ur3fnlPEjJix7p9fRaEmFpWdGL4tpiBi4gWbCjPtWItr/mfEjpSptvhjULeQTk IIwdH2fMktq0TfkEoyo7p/Rc0xNpQMKfr/ghK01iQ84U+PVYM6qqkBIXwSGIay3PfGC9 hkpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=9jrIbzWvoCYQgcJJyNCDCfNj2pQFwhu4pOWaG2kaKbQ=; b=oGVpy+5rS2JAeTawQfI3BHFO3fON9u9Kpg47/SmRq2TVd3VjAMou+N75Da/aVZ7+X8 BKVLhSwtDoNIBGrQKVyaUALcOX1Djt+IHlvpi9HcWX+gDyJ7oopqDcpNlJ1y6jMuZwkq gXlgnvss6x+1oO4zdhM1YTqBKGMqItippTWW2cH/gOyL0sAHmPN3bT9U5Foda+oPo2iL QGsQ2NYbAFJnre7E+JetGRS80RTcEHYK259jhjX/5WkCqmxwvrkXtAcGxcFv7VZYBf8W m1mJexvRePRkMyGMfzhiGbpUiyyg/+PsruoB1jqPivtjh1qzdz9IaWwP1uNlVmYa9EKc wRhg== X-Gm-Message-State: APjAAAXXh/y99nMjBaAitBNgbWnh/Jw4Zi6zha2me3FP0fm2vlt2aQ1z G2gxissc4r3hxv5sR5XrXS6Qlbp7 X-Google-Smtp-Source: APXvYqz3qogBwNLA6aHK/8aZYAsEYX4qzlmxvT1oOcGHzpQRRuTthbm3LDA9pzcHjVBq2XMUjP0pwg== X-Received: by 2002:a02:4005:: with SMTP id n5mr8845356jaa.73.1566635213835; Sat, 24 Aug 2019 01:26:53 -0700 (PDT) Received: from archbookpro.localdomain (CPE18593399858a-CM185933998587.cpe.net.cable.rogers.com. [174.112.89.95]) by smtp.gmail.com with ESMTPSA id q22sm3713573ioj.56.2019.08.24.01.26.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Aug 2019 01:26:53 -0700 (PDT) Date: Sat, 24 Aug 2019 04:26:51 -0400 From: Denton Liu To: Git Mailing List Cc: =?iso-8859-1?q?=C6var_Arnfj=F6r=F0?= Bjarmason , Junio C Hamano , Eric Sunshine , Johannes Sixt , Philip Oakley Subject: [PATCH 02/13] t4014: s/expected/expect/ Message-ID: <0a5ce9b95f837fb7c6b526201fa619da15fb2625.1566635008.git.liu.denton@gmail.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org For test cases, the usual convention is to name expected output files "expect", not "expected". Replace all instances of "expected" with "expect" except for one case where the "expected" is used as the name of a test case. Signed-off-by: Denton Liu --- t/t4014-format-patch.sh | 106 ++++++++++++++++++++-------------------- 1 file changed, 53 insertions(+), 53 deletions(-) diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh index 3ed3feabfe..62f5680f05 100755 --- a/t/t4014-format-patch.sh +++ b/t/t4014-format-patch.sh @@ -1209,32 +1209,32 @@ append_signoff() test_expect_success 'signoff: commit with no body' ' append_signoff actual && - cat <<\EOF | sed "s/EOL$//" >expected && + cat <<\EOF | sed "s/EOL$//" >expect && 4:Subject: [PATCH] EOL 8: 9:Signed-off-by: C O Mitter EOF - test_cmp expected actual + test_cmp expect actual ' test_expect_success 'signoff: commit with only subject' ' echo subject | append_signoff >actual && - cat >expected <<\EOF && + cat >expect <<\EOF && 4:Subject: [PATCH] subject 8: 9:Signed-off-by: C O Mitter EOF - test_cmp expected actual + test_cmp expect actual ' test_expect_success 'signoff: commit with only subject that does not end with NL' ' printf subject | append_signoff >actual && - cat >expected <<\EOF && + cat >expect <<\EOF && 4:Subject: [PATCH] subject 8: 9:Signed-off-by: C O Mitter EOF - test_cmp expected actual + test_cmp expect actual ' test_expect_success 'signoff: no existing signoffs' ' @@ -1243,24 +1243,24 @@ subject body EOF - cat >expected <<\EOF && + cat >expect <<\EOF && 4:Subject: [PATCH] subject 8: 10: 11:Signed-off-by: C O Mitter EOF - test_cmp expected actual + test_cmp expect actual ' test_expect_success 'signoff: no existing signoffs and no trailing NL' ' printf "subject\n\nbody" | append_signoff >actual && - cat >expected <<\EOF && + cat >expect <<\EOF && 4:Subject: [PATCH] subject 8: 10: 11:Signed-off-by: C O Mitter EOF - test_cmp expected actual + test_cmp expect actual ' test_expect_success 'signoff: some random signoff' ' @@ -1271,14 +1271,14 @@ body Signed-off-by: my@house EOF - cat >expected <<\EOF && + cat >expect <<\EOF && 4:Subject: [PATCH] subject 8: 10: 11:Signed-off-by: my@house 12:Signed-off-by: C O Mitter EOF - test_cmp expected actual + test_cmp expect actual ' test_expect_success 'signoff: misc conforming footer elements' ' @@ -1292,14 +1292,14 @@ Signed-off-by: my@house Tested-by: Some One Bug: 1234 EOF - cat >expected <<\EOF && + cat >expect <<\EOF && 4:Subject: [PATCH] subject 8: 10: 11:Signed-off-by: my@house 15:Signed-off-by: C O Mitter EOF - test_cmp expected actual + test_cmp expect actual ' test_expect_success 'signoff: some random signoff-alike' ' @@ -1309,13 +1309,13 @@ subject body Fooled-by-me: my@house EOF - cat >expected <<\EOF && + cat >expect <<\EOF && 4:Subject: [PATCH] subject 8: 11: 12:Signed-off-by: C O Mitter EOF - test_cmp expected actual + test_cmp expect actual ' test_expect_success 'signoff: not really a signoff' ' @@ -1324,14 +1324,14 @@ subject I want to mention about Signed-off-by: here. EOF - cat >expected <<\EOF && + cat >expect <<\EOF && 4:Subject: [PATCH] subject 8: 9:I want to mention about Signed-off-by: here. 10: 11:Signed-off-by: C O Mitter EOF - test_cmp expected actual + test_cmp expect actual ' test_expect_success 'signoff: not really a signoff (2)' ' @@ -1341,13 +1341,13 @@ subject My unfortunate Signed-off-by: example happens to be wrapped here. EOF - cat >expected <<\EOF && + cat >expect <<\EOF && 4:Subject: [PATCH] subject 8: 10:Signed-off-by: example happens to be wrapped here. 11:Signed-off-by: C O Mitter EOF - test_cmp expected actual + test_cmp expect actual ' test_expect_success 'signoff: valid S-o-b paragraph in the middle' ' @@ -1359,7 +1359,7 @@ Signed-off-by: your@house A lot of houses. EOF - cat >expected <<\EOF && + cat >expect <<\EOF && 4:Subject: [PATCH] subject 8: 9:Signed-off-by: my@house @@ -1368,7 +1368,7 @@ EOF 13: 14:Signed-off-by: C O Mitter EOF - test_cmp expected actual + test_cmp expect actual ' test_expect_success 'signoff: the same signoff at the end' ' @@ -1379,24 +1379,24 @@ body Signed-off-by: C O Mitter EOF - cat >expected <<\EOF && + cat >expect <<\EOF && 4:Subject: [PATCH] subject 8: 10: 11:Signed-off-by: C O Mitter EOF - test_cmp expected actual + test_cmp expect actual ' test_expect_success 'signoff: the same signoff at the end, no trailing NL' ' printf "subject\n\nSigned-off-by: C O Mitter " | append_signoff >actual && - cat >expected <<\EOF && + cat >expect <<\EOF && 4:Subject: [PATCH] subject 8: 9:Signed-off-by: C O Mitter EOF - test_cmp expected actual + test_cmp expect actual ' test_expect_success 'signoff: the same signoff NOT at the end' ' @@ -1408,14 +1408,14 @@ body Signed-off-by: C O Mitter Signed-off-by: my@house EOF - cat >expected <<\EOF && + cat >expect <<\EOF && 4:Subject: [PATCH] subject 8: 10: 11:Signed-off-by: C O Mitter 12:Signed-off-by: my@house EOF - test_cmp expected actual + test_cmp expect actual ' test_expect_success 'signoff: tolerate garbage in conforming footer' ' @@ -1428,13 +1428,13 @@ Tested-by: my@house Some Trash Signed-off-by: C O Mitter EOF - cat >expected <<\EOF && + cat >expect <<\EOF && 4:Subject: [PATCH] subject 8: 10: 13:Signed-off-by: C O Mitter EOF - test_cmp expected actual + test_cmp expect actual ' test_expect_success 'signoff: respect trailer config' ' @@ -1444,13 +1444,13 @@ subject Myfooter: x Some Trash EOF - cat >expected <<\EOF && + cat >expect <<\EOF && 4:Subject: [PATCH] subject 8: 11: 12:Signed-off-by: C O Mitter EOF - test_cmp expected actual && + test_cmp expect actual && test_config trailer.Myfooter.ifexists add && append_signoff <<\EOF >actual && @@ -1459,12 +1459,12 @@ subject Myfooter: x Some Trash EOF - cat >expected <<\EOF && + cat >expect <<\EOF && 4:Subject: [PATCH] subject 8: 11:Signed-off-by: C O Mitter EOF - test_cmp expected actual + test_cmp expect actual ' test_expect_success 'signoff: footer begins with non-signoff without @ sign' ' @@ -1479,13 +1479,13 @@ Change-id: Ideadbeef Signed-off-by: C O Mitter Bug: 1234 EOF - cat >expected <<\EOF && + cat >expect <<\EOF && 4:Subject: [PATCH] subject 8: 10: 14:Signed-off-by: C O Mitter EOF - test_cmp expected actual + test_cmp expect actual ' test_expect_success 'format patch ignores color.ui' ' @@ -1604,13 +1604,13 @@ test_expect_success 'format-patch --base' ' git checkout patchid && git format-patch --stdout --base=HEAD~3 -1 | tail -n 7 >actual1 && git format-patch --stdout --base=HEAD~3 HEAD~.. | tail -n 7 >actual2 && - echo >expected && - echo "base-commit: $(git rev-parse HEAD~3)" >>expected && - echo "prerequisite-patch-id: $(git show --patch HEAD~2 | git patch-id --stable | awk "{print \$1}")" >>expected && - echo "prerequisite-patch-id: $(git show --patch HEAD~1 | git patch-id --stable | awk "{print \$1}")" >>expected && - signature >> expected && - test_cmp expected actual1 && - test_cmp expected actual2 && + echo >expect && + echo "base-commit: $(git rev-parse HEAD~3)" >>expect && + echo "prerequisite-patch-id: $(git show --patch HEAD~2 | git patch-id --stable | awk "{print \$1}")" >>expect && + echo "prerequisite-patch-id: $(git show --patch HEAD~1 | git patch-id --stable | awk "{print \$1}")" >>expect && + signature >> expect && + test_cmp expect actual1 && + test_cmp expect actual2 && echo >fail && echo "base-commit: $(git rev-parse HEAD~3)" >>fail && echo "prerequisite-patch-id: $(git show --patch HEAD~2 | git patch-id --unstable | awk "{print \$1}")" >>fail && @@ -1625,8 +1625,8 @@ test_expect_success 'format-patch --base errors out when base commit is in revis test_must_fail git format-patch --base=HEAD~1 -2 && git format-patch --stdout --base=HEAD~2 -2 >patch && grep "^base-commit:" patch >actual && - echo "base-commit: $(git rev-parse HEAD~2)" >expected && - test_cmp expected actual + echo "base-commit: $(git rev-parse HEAD~2)" >expect && + test_cmp expect actual ' test_expect_success 'format-patch --base errors out when base commit is not ancestor of revision list' ' @@ -1652,8 +1652,8 @@ test_expect_success 'format-patch --base errors out when base commit is not ance test_must_fail git format-patch --base=$(cat commit-id-Z) -3 && git format-patch --stdout --base=$(cat commit-id-base) -3 >patch && grep "^base-commit:" patch >actual && - echo "base-commit: $(cat commit-id-base)" >expected && - test_cmp expected actual + echo "base-commit: $(cat commit-id-base)" >expect && + test_cmp expect actual ' test_expect_success 'format-patch --base=auto' ' @@ -1664,8 +1664,8 @@ test_expect_success 'format-patch --base=auto' ' test_commit N2 && git format-patch --stdout --base=auto -2 >patch && grep "^base-commit:" patch >actual && - echo "base-commit: $(git rev-parse upstream)" >expected && - test_cmp expected actual + echo "base-commit: $(git rev-parse upstream)" >expect && + test_cmp expect actual ' test_expect_success 'format-patch errors out when history involves criss-cross' ' @@ -1701,8 +1701,8 @@ test_expect_success 'format-patch format.useAutoBaseoption' ' git config format.useAutoBase true && git format-patch --stdout -1 >patch && grep "^base-commit:" patch >actual && - echo "base-commit: $(git rev-parse upstream)" >expected && - test_cmp expected actual + echo "base-commit: $(git rev-parse upstream)" >expect && + test_cmp expect actual ' test_expect_success 'format-patch --base overrides format.useAutoBase' ' @@ -1710,8 +1710,8 @@ test_expect_success 'format-patch --base overrides format.useAutoBase' ' git config format.useAutoBase true && git format-patch --stdout --base=HEAD~1 -1 >patch && grep "^base-commit:" patch >actual && - echo "base-commit: $(git rev-parse HEAD~1)" >expected && - test_cmp expected actual + echo "base-commit: $(git rev-parse HEAD~1)" >expect && + test_cmp expect actual ' test_expect_success 'format-patch --base with --attach' ' From patchwork Sat Aug 24 08:26:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denton Liu X-Patchwork-Id: 11112931 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8E28C1890 for ; Sat, 24 Aug 2019 08:27:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6B0122146E for ; Sat, 24 Aug 2019 08:27:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="VN8qaCaV" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726966AbfHXI05 (ORCPT ); Sat, 24 Aug 2019 04:26:57 -0400 Received: from mail-io1-f67.google.com ([209.85.166.67]:36021 "EHLO mail-io1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726946AbfHXI05 (ORCPT ); Sat, 24 Aug 2019 04:26:57 -0400 Received: by mail-io1-f67.google.com with SMTP id o9so25644600iom.3 for ; Sat, 24 Aug 2019 01:26:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=IUxUkhQu8IKRPJnJfvXqpZRjIm/zAINbPLEtvMCz0aY=; b=VN8qaCaVvTpri60jmeSdezVjhsbWV0urNRBaHYXRT1jNvaO/JDiKRmd0pTbGlMSQpb JuWkZOE/68bIZhpM2UnM+H/VD0AWWWhteDvPA/xuhc8NiZKcAddFQPvLGIFEt4jYRB/4 qOGtlakxPaIr8d8M8HR4qTu8b5/daHCAXn+uji4ZxZPYqtm3G5HrJiHjphCQT0E5Tt33 F5fuqiOB2KrYO6hOb5vhbuyFdIghZfQRu92lrstTA4axnrahPjE3ROuImv9Wt5PyjDyL OaOzGTlVsZZdCJJYNK5LUx8toYGR9uU+OpCjGHbFdO8zX2+awChN9ydalb4RFHVQ6oQw lj9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=IUxUkhQu8IKRPJnJfvXqpZRjIm/zAINbPLEtvMCz0aY=; b=mJCvLs2H8qsmmG1SK+GDUdkNiq2qlSKruyloHj8lGcMSEyi8OTaoDninBKMI+GRvGc XVcPT7Ku4fpVF1nRRIEIoSWdrSH+KJw8cHKX98DG8y4DUHJ7kodPQa1l1jQc4PI0Y2/a VPU2FHFkQZp5oXjPRmuLWFh8Ziq0PUiA5THM8/7hj7MD+Hp83nVs6LZ8x7RH1d1a8mhP 5p9zvwpG8c//HH+B+JAsueasMvKbKEg58d1LaFpbUzfebeiHv8KCuUEbCBBRcVV999Dr Smhtu8oRU+dXOYaAKUGaFENY2+G46Mor9l+9gKcTWBfVeu/zSRf7zp1Ff6M0UhDhd6+8 HV2Q== X-Gm-Message-State: APjAAAVFCtJ+9037MC2DMPKPVHK5ZBqLaBIS6dqFRQzSE0Ui5aaDb3QR XDniDsswlkcrI2n3jvrs7LEC9ndn X-Google-Smtp-Source: APXvYqxj0dmDpN3ZibGJgXj+gMabyPLbtZ0gqHm0UzsvBzUIFimieL+85GBaEGQ/xJKox/D6uRJMeA== X-Received: by 2002:a6b:731a:: with SMTP id e26mr5218753ioh.188.1566635216090; Sat, 24 Aug 2019 01:26:56 -0700 (PDT) Received: from archbookpro.localdomain (CPE18593399858a-CM185933998587.cpe.net.cable.rogers.com. [174.112.89.95]) by smtp.gmail.com with ESMTPSA id m20sm3917032ioh.4.2019.08.24.01.26.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Aug 2019 01:26:55 -0700 (PDT) Date: Sat, 24 Aug 2019 04:26:54 -0400 From: Denton Liu To: Git Mailing List Cc: =?iso-8859-1?q?=C6var_Arnfj=F6r=F0?= Bjarmason , Junio C Hamano , Eric Sunshine , Johannes Sixt , Philip Oakley Subject: [PATCH 03/13] t4014: move closing sq onto its own line Message-ID: <5c49703aa4fd3741d1685d25b647d775003f9962.1566635008.git.liu.denton@gmail.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org The usual convention for test cases is for the closing sq to be on its own line. Move the sq onto its own line for cases that do not conform to this style. Signed-off-by: Denton Liu --- t/t4014-format-patch.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh index 62f5680f05..5e8eb6fb27 100755 --- a/t/t4014-format-patch.sh +++ b/t/t4014-format-patch.sh @@ -790,11 +790,13 @@ test_expect_success 'options no longer allowed for format-patch' ' test_must_fail git format-patch --name-status 2> output && test_i18ncmp expect.name-status output && test_must_fail git format-patch --check 2> output && - test_i18ncmp expect.check output' + test_i18ncmp expect.check output +' test_expect_success 'format-patch --numstat should produce a patch' ' git format-patch --numstat --stdout master..side > output && - test 5 = $(grep "^diff --git a/" output | wc -l)' + test 5 = $(grep "^diff --git a/" output | wc -l) +' test_expect_success 'format-patch -- ' ' git format-patch master..side -- file 2>error && From patchwork Sat Aug 24 08:26:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denton Liu X-Patchwork-Id: 11112933 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C27EA1864 for ; Sat, 24 Aug 2019 08:27:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 965442146E for ; Sat, 24 Aug 2019 08:27:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="a21Q9jZC" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727012AbfHXI07 (ORCPT ); Sat, 24 Aug 2019 04:26:59 -0400 Received: from mail-io1-f65.google.com ([209.85.166.65]:38628 "EHLO mail-io1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726946AbfHXI07 (ORCPT ); Sat, 24 Aug 2019 04:26:59 -0400 Received: by mail-io1-f65.google.com with SMTP id p12so25686971iog.5 for ; Sat, 24 Aug 2019 01:26:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=Il9LwpJVzdzduiFquLf1KD7uEGxhXQfU8tLcnW9qImI=; b=a21Q9jZCXbISplxvD38lUKYJcKXrVa8LXqbTwOL2To4mYQL8jCMRqqppEFkua1Vk7/ mGQc+yXP8c+wPRI+PNImgLIOk/WO4HXGYYUdOZLknLYxcyh7wd87zePhrNdpbwJLoUfg oGkQqSVG9tRknVlTQKnjY5odovJ9cFlGRQaKezuoOztnAnWzNgxQv7VwIRq4V8PmcHxq 3QgEVWy+xQz+aj9y+FzqohKOLt7TikkN8AlC30TC1X4evAfvGVca3Qh9Ngy99CgMOcAm qMpcJOZNerTvN8U9dZK93fAqcYjopI8oB6ThBHivOB4N+3EG6IytvnhlbVsImbv0h4HR Vmfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=Il9LwpJVzdzduiFquLf1KD7uEGxhXQfU8tLcnW9qImI=; b=HQN3YSs6sj0OBL7y/3ZitNl/WCZDTQgh6CgcmSrpOROWVLMQXu0yyrPtkCzlMiDgQ7 28flYqj15ihBYvHzbL8X+UHkaG4JprZa0hioanTDhBlZOrCuw+XwmOcLrc16xbOn8fyP eXSZNxRz3YweVKkzRErJ/lS7UYSk7iKhEKFCLeyJrmUtlVC2ZxS0FT/qkniHuCoWfTf8 FJ2iGNXaaFR0JOziybqJc7V8RlaF8IW36K2MsEEK1Yk7aZRRGtEVbvXWsiCqWduuVMku vk0DMGCv4g5qni93/tb0y0YZEnON105zCrWfUAwAW05k+NboZpQlyLYbQ8ComXyQHYFo RYzw== X-Gm-Message-State: APjAAAVr+IiDy7W0JQc4CE7Nd2ZG3MqyfjgXGeH057XMxRt3Dc9KXAyO fAl/HmYGYXrGaEJKYIKseyaVTQaV X-Google-Smtp-Source: APXvYqz4EdKHEA5LwJmuo2Czoq7QULynGzQ5EmSO6mGtlwVv+gfCZhgDeXOAXfgyUplrIMj6OHlqzg== X-Received: by 2002:a6b:ed01:: with SMTP id n1mr7138446iog.255.1566635218358; Sat, 24 Aug 2019 01:26:58 -0700 (PDT) Received: from archbookpro.localdomain (CPE18593399858a-CM185933998587.cpe.net.cable.rogers.com. [174.112.89.95]) by smtp.gmail.com with ESMTPSA id l6sm3729078ioc.15.2019.08.24.01.26.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Aug 2019 01:26:57 -0700 (PDT) Date: Sat, 24 Aug 2019 04:26:56 -0400 From: Denton Liu To: Git Mailing List Cc: =?iso-8859-1?q?=C6var_Arnfj=F6r=F0?= Bjarmason , Junio C Hamano , Eric Sunshine , Johannes Sixt , Philip Oakley Subject: [PATCH 04/13] t4014: use sq for test case names Message-ID: <02a11147fd016be4f0933cc30a759cb688506f4f.1566635008.git.liu.denton@gmail.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org The usual convention is for test case names to be written between single-quotes. Change all double-quoted test case names to single-quotes except for one test case name that uses a sq for a contraction. Signed-off-by: Denton Liu --- t/t4014-format-patch.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh index 5e8eb6fb27..a7b440b003 100755 --- a/t/t4014-format-patch.sh +++ b/t/t4014-format-patch.sh @@ -58,20 +58,20 @@ test_expect_success setup ' git checkout master ' -test_expect_success "format-patch --ignore-if-in-upstream" ' +test_expect_success 'format-patch --ignore-if-in-upstream' ' git format-patch --stdout master..side >patch0 && cnt=$(grep "^From " patch0 | wc -l) && test $cnt = 3 ' -test_expect_success "format-patch --ignore-if-in-upstream" ' +test_expect_success 'format-patch --ignore-if-in-upstream' ' git format-patch --stdout \ --ignore-if-in-upstream master..side >patch1 && cnt=$(grep "^From " patch1 | wc -l) && test $cnt = 2 ' -test_expect_success "format-patch --ignore-if-in-upstream handles tags" ' +test_expect_success 'format-patch --ignore-if-in-upstream handles tags' ' git tag -a v1 -m tag side && git tag -a v2 -m tag master && git format-patch --stdout --ignore-if-in-upstream v2..v1 >patch1 && @@ -94,14 +94,14 @@ test_expect_success "format-patch doesn't consider merge commits" ' test $cnt = 3 ' -test_expect_success "format-patch result applies" ' +test_expect_success 'format-patch result applies' ' git checkout -b rebuild-0 master && git am -3 patch0 && cnt=$(git rev-list master.. | wc -l) && test $cnt = 2 ' -test_expect_success "format-patch --ignore-if-in-upstream result applies" ' +test_expect_success 'format-patch --ignore-if-in-upstream result applies' ' git checkout -b rebuild-1 master && git am -3 patch1 && cnt=$(git rev-list master.. | wc -l) && From patchwork Sat Aug 24 08:26:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denton Liu X-Patchwork-Id: 11112937 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EE1A91922 for ; Sat, 24 Aug 2019 08:27:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CB8302146E for ; Sat, 24 Aug 2019 08:27:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="etZ3ULep" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727046AbfHXI1D (ORCPT ); Sat, 24 Aug 2019 04:27:03 -0400 Received: from mail-io1-f65.google.com ([209.85.166.65]:34811 "EHLO mail-io1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726946AbfHXI1C (ORCPT ); Sat, 24 Aug 2019 04:27:02 -0400 Received: by mail-io1-f65.google.com with SMTP id s21so25716946ioa.1 for ; Sat, 24 Aug 2019 01:27:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=gxFfx/GtskVA+8qxu2cO2SZogZyMuZZHPSx3Y+yQlTw=; b=etZ3ULepQjkpiJPkySgR26QtGeCfnHyQgRRd3lM7s8bt8yx29HRCwZuzEkdJMl2muw 0v81Zq9et4iY5rkSxSUOQPPrnLLety7egi2rTRnBQa/jmcvPMuESMOBqNn1QtWdPAafN XBVZu90LFMQ2rrdU1jhAdOfNo4u4ps/QkF92X6ufBwpLxCOaJH3lDFLd923THMiw2wXL rytD5vOpXGPrv5dhWW23mFJxFUpGzJ7cpV+dNmeD37XWEuPul9qHqLQkB7XMALdubOXk 7dzxEBZtW9RBxdtYpcCYqDyJutsPxxfls5raI7yJHY7VVRdVG5EFY6yxMvtcGlYrcv2W 6uFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=gxFfx/GtskVA+8qxu2cO2SZogZyMuZZHPSx3Y+yQlTw=; b=pvp6cYuho7UITO6gQeeqTuc6MQRKvgZLUkT5DSXt2YVnS2klb4tSGdPcyzkeTK9e5o 2KtVZfAGCITI0CVhPpvbpQmlzICOX+KbXNa72OeRJClhGlRbS73F5dFL9aWbhvtay6eG a43TJ3tPBfR3RY3zAjZyUGJPLh7ze1yso+bEq2SCqPX5NxjdmSHSO84hp78h/QzepTa/ CNPH0eo14o46SW4p/Z35q4DGfmQUpFcec03jy8ifE55WqEfOWyBdtdCFb0ZgDxn9MQqt Ny4EwqijVIrwAtaI8HoCuCibbA0i4k00dC9RJ2mPizUyenwp0Fg6Uy7NgMx5IKx6g+xW axYw== X-Gm-Message-State: APjAAAVm0YUDf63b/KEH3pQS1+XrFoYXwvbJdKSMEfxxEBclvjyvhsrw BNvNPkph+I2ZREYr4rkT3yRPbs51 X-Google-Smtp-Source: APXvYqy0h9C+8LfgoO16GQThE+fGAxet9CTMwlKzR57w69gDoLgictx22PWPgsr90qNi1RpCkcQCpA== X-Received: by 2002:a6b:6102:: with SMTP id v2mr11774089iob.295.1566635220673; Sat, 24 Aug 2019 01:27:00 -0700 (PDT) Received: from archbookpro.localdomain (CPE18593399858a-CM185933998587.cpe.net.cable.rogers.com. [174.112.89.95]) by smtp.gmail.com with ESMTPSA id k3sm6520371ioq.18.2019.08.24.01.26.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Aug 2019 01:27:00 -0700 (PDT) Date: Sat, 24 Aug 2019 04:26:58 -0400 From: Denton Liu To: Git Mailing List Cc: =?iso-8859-1?q?=C6var_Arnfj=F6r=F0?= Bjarmason , Junio C Hamano , Eric Sunshine , Johannes Sixt , Philip Oakley Subject: [PATCH 05/13] t4014: remove spaces after redirect operators Message-ID: <8d9791c0611897f3bd3cbeaf5df65db8925a3e65.1566635008.git.liu.denton@gmail.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org For shell scripts, the usual convention is for there to be no space after redirection operators, (e.g. `>file`, not `> file`). Remove these spaces wherever they appear. Signed-off-by: Denton Liu --- t/t4014-format-patch.sh | 62 ++++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh index a7b440b003..075affb1e5 100755 --- a/t/t4014-format-patch.sh +++ b/t/t4014-format-patch.sh @@ -126,8 +126,8 @@ test_expect_success 'extra headers' ' " && git config --add format.headers "Cc: S E Cipient " && - git format-patch --stdout master..side > patch2 && - sed -e "/^\$/q" patch2 > hdrs2 && + git format-patch --stdout master..side >patch2 && + sed -e "/^\$/q" patch2 >hdrs2 && grep "^To: R E Cipient \$" hdrs2 && grep "^Cc: S E Cipient \$" hdrs2 ' @@ -136,7 +136,7 @@ test_expect_success 'extra headers without newlines' ' git config --replace-all format.headers "To: R E Cipient " && git config --add format.headers "Cc: S E Cipient " && git format-patch --stdout master..side >patch3 && - sed -e "/^\$/q" patch3 > hdrs3 && + sed -e "/^\$/q" patch3 >hdrs3 && grep "^To: R E Cipient \$" hdrs3 && grep "^Cc: S E Cipient \$" hdrs3 ' @@ -144,8 +144,8 @@ test_expect_success 'extra headers without newlines' ' test_expect_success 'extra headers with multiple To:s' ' git config --replace-all format.headers "To: R E Cipient " && git config --add format.headers "To: S E Cipient " && - git format-patch --stdout master..side > patch4 && - sed -e "/^\$/q" patch4 > hdrs4 && + git format-patch --stdout master..side >patch4 && + sed -e "/^\$/q" patch4 >hdrs4 && grep "^To: R E Cipient ,\$" hdrs4 && grep "^ *S E Cipient \$" hdrs4 ' @@ -318,7 +318,7 @@ test_expect_success 'reroll count (-v)' ' check_threading () { expect="$1" && shift && - (git format-patch --stdout "$@"; echo $? > status.out) | + (git format-patch --stdout "$@"; echo $? >status.out) | # Prints everything between the Message-ID and In-Reply-To, # and replaces all Message-ID-lookalikes by a sequence number perl -ne ' @@ -333,12 +333,12 @@ check_threading () { print; } print "---\n" if /^From /i; - ' > actual && + ' >actual && test 0 = "$(cat status.out)" && test_cmp "$expect" actual } -cat >> expect.no-threading <>expect.no-threading < expect.thread <expect.thread < --- @@ -366,7 +366,7 @@ test_expect_success 'thread' ' check_threading expect.thread --thread master ' -cat > expect.in-reply-to <expect.in-reply-to < In-Reply-To: <1> @@ -386,7 +386,7 @@ test_expect_success 'thread in-reply-to' ' --thread master ' -cat > expect.cover-letter <expect.cover-letter < --- @@ -407,7 +407,7 @@ test_expect_success 'thread cover-letter' ' check_threading expect.cover-letter --cover-letter --thread master ' -cat > expect.cl-irt <expect.cl-irt < In-Reply-To: <1> @@ -439,7 +439,7 @@ test_expect_success 'thread explicit shallow' ' --in-reply-to="" --thread=shallow master ' -cat > expect.deep <expect.deep < --- @@ -457,7 +457,7 @@ test_expect_success 'thread deep' ' check_threading expect.deep --thread=deep master ' -cat > expect.deep-irt <expect.deep-irt < In-Reply-To: <1> @@ -480,7 +480,7 @@ test_expect_success 'thread deep in-reply-to' ' --in-reply-to="" master ' -cat > expect.deep-cl <expect.deep-cl < --- @@ -504,7 +504,7 @@ test_expect_success 'thread deep cover-letter' ' check_threading expect.deep-cl --cover-letter --thread=deep master ' -cat > expect.deep-cl-irt <expect.deep-cl-irt < In-Reply-To: <1> @@ -584,7 +584,7 @@ test_expect_success 'cover-letter inherits diff options' ' grep "file => foo .* 0 *\$" 0000-cover-letter.patch ' -cat > expect << EOF +cat >expect < output && + sed -e "1,/A U Thor/d" -e "/^\$/q" <0000-cover-letter.patch >output && test_cmp expect output ' -cat > expect << EOF +cat >expect < expect << EOF +cat >expect < output && + sed -e "1,/^\$/d" -e "/^+5/q" <0001-This-is-an-excessively-long-subject-line-for-a-messa.patch >output && test_cmp expect output ' @@ -689,7 +689,7 @@ test_expect_success 'format-patch from a subdirectory (3)' ' ' test_expect_success 'format-patch --in-reply-to' ' - git format-patch -1 --stdout --in-reply-to "baz@foo.bar" > patch8 && + git format-patch -1 --stdout --in-reply-to "baz@foo.bar" >patch8 && grep "^In-Reply-To: " patch8 && grep "^References: " patch8 ' @@ -780,21 +780,21 @@ test_expect_success 'format-patch with multiple notes refs' ' ! grep "this is note 2" out ' -echo "fatal: --name-only does not make sense" > expect.name-only -echo "fatal: --name-status does not make sense" > expect.name-status -echo "fatal: --check does not make sense" > expect.check +echo "fatal: --name-only does not make sense" >expect.name-only +echo "fatal: --name-status does not make sense" >expect.name-status +echo "fatal: --check does not make sense" >expect.check test_expect_success 'options no longer allowed for format-patch' ' - test_must_fail git format-patch --name-only 2> output && + test_must_fail git format-patch --name-only 2>output && test_i18ncmp expect.name-only output && - test_must_fail git format-patch --name-status 2> output && + test_must_fail git format-patch --name-status 2>output && test_i18ncmp expect.name-status output && - test_must_fail git format-patch --check 2> output && + test_must_fail git format-patch --check 2>output && test_i18ncmp expect.check output ' test_expect_success 'format-patch --numstat should produce a patch' ' - git format-patch --numstat --stdout master..side > output && + git format-patch --numstat --stdout master..side >output && test 5 = $(grep "^diff --git a/" output | wc -l) ' @@ -1610,14 +1610,14 @@ test_expect_success 'format-patch --base' ' echo "base-commit: $(git rev-parse HEAD~3)" >>expect && echo "prerequisite-patch-id: $(git show --patch HEAD~2 | git patch-id --stable | awk "{print \$1}")" >>expect && echo "prerequisite-patch-id: $(git show --patch HEAD~1 | git patch-id --stable | awk "{print \$1}")" >>expect && - signature >> expect && + signature >>expect && test_cmp expect actual1 && test_cmp expect actual2 && echo >fail && echo "base-commit: $(git rev-parse HEAD~3)" >>fail && echo "prerequisite-patch-id: $(git show --patch HEAD~2 | git patch-id --unstable | awk "{print \$1}")" >>fail && echo "prerequisite-patch-id: $(git show --patch HEAD~1 | git patch-id --unstable | awk "{print \$1}")" >>fail && - signature >> fail && + signature >>fail && ! test_cmp fail actual1 && ! test_cmp fail actual2 ' From patchwork Sat Aug 24 08:27:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denton Liu X-Patchwork-Id: 11112935 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 256B81920 for ; Sat, 24 Aug 2019 08:27:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 02B002146E for ; Sat, 24 Aug 2019 08:27:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="jVXVej3R" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727066AbfHXI1F (ORCPT ); Sat, 24 Aug 2019 04:27:05 -0400 Received: from mail-io1-f68.google.com ([209.85.166.68]:47098 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726946AbfHXI1E (ORCPT ); Sat, 24 Aug 2019 04:27:04 -0400 Received: by mail-io1-f68.google.com with SMTP id x4so25511937iog.13 for ; Sat, 24 Aug 2019 01:27:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=/pQmeh6he9iEyqMs6LHy0NzLVmE3L+BX4bVCvFJpJrE=; b=jVXVej3RaZ7Y17X60q59oWcyeHyzbj9+5u9cXvTZ4sMWI9UMBACbvpFKaHh7Sc+o6g 25io+7gubfc7Ux93xRrJmHVVZRVPq+V2Smd5MHTT+S1vL8r6oGmtpIUav2zJzBC7EbnC Ap9z0yyyLXJlMc64rk8WHcJY0ucMA83KTyjh5iNSRIMcHUN/nJ9D7sXStCkWZ0JFWQoz KYTG+1Nnm+zbPFZs9vYuoSaLjHVp9Vy1lGA243EIYY4DoPPfKv+VbOmDMU6Z4vlGg9oA bVS6JT4lQyTgGNTNQCYEQhaU+eVsXYxtwd3iO2THEWazWgJZ3AYwQQm59Q7Y0ZddRcCq 6Ltg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=/pQmeh6he9iEyqMs6LHy0NzLVmE3L+BX4bVCvFJpJrE=; b=hBos5gQWo85bixYqMbWFhF9xjY/AWtQXt5lDpbLp9XqGBPvJ3rseqNIuDnSCDw0vec otwcVW4W2E0PxBXdNHIpEX+R2oQX+ZShlI4EtYKz7nhojAga6BA2nObTY7kAwaBW5Hws /ccWyklIGCoKU9M/7bNSmfpIQbPs9R5XrXsQ67FBWzOUJt8BSIYgD1mYXnpKRmdXODIL d8MwkzsppI+JlZ5u4lnYQGeQ681VzBpqAJF94MsTfPthHvl6q0KDEpgBf4vfH443QfWB TF/pOzl3LIr2OrwoU3F8LpkN14cxr3uPMAT7ZHAfoZbLSd/+pZSB4fFxPcrywPwumeoJ GA3A== X-Gm-Message-State: APjAAAXf4SgpUknptRYAR9jpC/6bBYLLqTcgEfcyPLdtZQFOv7fMwfSx 8ngIXs6KySORvC6ccxIO9jERk81I X-Google-Smtp-Source: APXvYqzrHC8vxHsdpx3Wd/wtc35WPy0JizFsbSDt1nL11VQ7P/jMNKvbeVz8CGubQfZ4BdII1Emoyg== X-Received: by 2002:a5e:d611:: with SMTP id w17mr11593118iom.34.1566635223606; Sat, 24 Aug 2019 01:27:03 -0700 (PDT) Received: from archbookpro.localdomain (CPE18593399858a-CM185933998587.cpe.net.cable.rogers.com. [174.112.89.95]) by smtp.gmail.com with ESMTPSA id o2sm3429574iob.64.2019.08.24.01.27.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Aug 2019 01:27:03 -0700 (PDT) Date: Sat, 24 Aug 2019 04:27:00 -0400 From: Denton Liu To: Git Mailing List Cc: =?iso-8859-1?q?=C6var_Arnfj=F6r=F0?= Bjarmason , Junio C Hamano , Eric Sunshine , Johannes Sixt , Philip Oakley Subject: [PATCH 06/13] t4014: use indentable here-docs Message-ID: <90ad0fcf703e8b932789194b0a86ce061ffd48e0.1566635008.git.liu.denton@gmail.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org The convention is to use indentable here-docs within test cases so that the here-docs line up with the rest of the code within the test case. Change here-docs from `<<\EOF` to `<<-\EOF` so that they can be indented along with the rest of the test case. Signed-off-by: Denton Liu --- t/t4014-format-patch.sh | 368 ++++++++++++++++++++-------------------- 1 file changed, 184 insertions(+), 184 deletions(-) diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh index 075affb1e5..c07d868491 100755 --- a/t/t4014-format-patch.sh +++ b/t/t4014-format-patch.sh @@ -1211,282 +1211,282 @@ append_signoff() test_expect_success 'signoff: commit with no body' ' append_signoff actual && - cat <<\EOF | sed "s/EOL$//" >expect && -4:Subject: [PATCH] EOL -8: -9:Signed-off-by: C O Mitter -EOF + cat <<-\EOF | sed "s/EOL$//" >expect && + 4:Subject: [PATCH] EOL + 8: + 9:Signed-off-by: C O Mitter + EOF test_cmp expect actual ' test_expect_success 'signoff: commit with only subject' ' echo subject | append_signoff >actual && - cat >expect <<\EOF && -4:Subject: [PATCH] subject -8: -9:Signed-off-by: C O Mitter -EOF + cat >expect <<-\EOF && + 4:Subject: [PATCH] subject + 8: + 9:Signed-off-by: C O Mitter + EOF test_cmp expect actual ' test_expect_success 'signoff: commit with only subject that does not end with NL' ' printf subject | append_signoff >actual && - cat >expect <<\EOF && -4:Subject: [PATCH] subject -8: -9:Signed-off-by: C O Mitter -EOF + cat >expect <<-\EOF && + 4:Subject: [PATCH] subject + 8: + 9:Signed-off-by: C O Mitter + EOF test_cmp expect actual ' test_expect_success 'signoff: no existing signoffs' ' - append_signoff <<\EOF >actual && -subject + append_signoff <<-\EOF >actual && + subject -body -EOF - cat >expect <<\EOF && -4:Subject: [PATCH] subject -8: -10: -11:Signed-off-by: C O Mitter -EOF + body + EOF + cat >expect <<-\EOF && + 4:Subject: [PATCH] subject + 8: + 10: + 11:Signed-off-by: C O Mitter + EOF test_cmp expect actual ' test_expect_success 'signoff: no existing signoffs and no trailing NL' ' printf "subject\n\nbody" | append_signoff >actual && - cat >expect <<\EOF && -4:Subject: [PATCH] subject -8: -10: -11:Signed-off-by: C O Mitter -EOF + cat >expect <<-\EOF && + 4:Subject: [PATCH] subject + 8: + 10: + 11:Signed-off-by: C O Mitter + EOF test_cmp expect actual ' test_expect_success 'signoff: some random signoff' ' - append_signoff <<\EOF >actual && -subject + append_signoff <<-\EOF >actual && + subject -body + body -Signed-off-by: my@house -EOF - cat >expect <<\EOF && -4:Subject: [PATCH] subject -8: -10: -11:Signed-off-by: my@house -12:Signed-off-by: C O Mitter -EOF + Signed-off-by: my@house + EOF + cat >expect <<-\EOF && + 4:Subject: [PATCH] subject + 8: + 10: + 11:Signed-off-by: my@house + 12:Signed-off-by: C O Mitter + EOF test_cmp expect actual ' test_expect_success 'signoff: misc conforming footer elements' ' - append_signoff <<\EOF >actual && -subject + append_signoff <<-\EOF >actual && + subject -body + body -Signed-off-by: my@house -(cherry picked from commit da39a3ee5e6b4b0d3255bfef95601890afd80709) -Tested-by: Some One -Bug: 1234 -EOF - cat >expect <<\EOF && -4:Subject: [PATCH] subject -8: -10: -11:Signed-off-by: my@house -15:Signed-off-by: C O Mitter -EOF + Signed-off-by: my@house + (cherry picked from commit da39a3ee5e6b4b0d3255bfef95601890afd80709) + Tested-by: Some One + Bug: 1234 + EOF + cat >expect <<-\EOF && + 4:Subject: [PATCH] subject + 8: + 10: + 11:Signed-off-by: my@house + 15:Signed-off-by: C O Mitter + EOF test_cmp expect actual ' test_expect_success 'signoff: some random signoff-alike' ' - append_signoff <<\EOF >actual && -subject + append_signoff <<-\EOF >actual && + subject -body -Fooled-by-me: my@house -EOF - cat >expect <<\EOF && -4:Subject: [PATCH] subject -8: -11: -12:Signed-off-by: C O Mitter -EOF + body + Fooled-by-me: my@house + EOF + cat >expect <<-\EOF && + 4:Subject: [PATCH] subject + 8: + 11: + 12:Signed-off-by: C O Mitter + EOF test_cmp expect actual ' test_expect_success 'signoff: not really a signoff' ' - append_signoff <<\EOF >actual && -subject + append_signoff <<-\EOF >actual && + subject -I want to mention about Signed-off-by: here. -EOF - cat >expect <<\EOF && -4:Subject: [PATCH] subject -8: -9:I want to mention about Signed-off-by: here. -10: -11:Signed-off-by: C O Mitter -EOF + I want to mention about Signed-off-by: here. + EOF + cat >expect <<-\EOF && + 4:Subject: [PATCH] subject + 8: + 9:I want to mention about Signed-off-by: here. + 10: + 11:Signed-off-by: C O Mitter + EOF test_cmp expect actual ' test_expect_success 'signoff: not really a signoff (2)' ' - append_signoff <<\EOF >actual && -subject + append_signoff <<-\EOF >actual && + subject -My unfortunate -Signed-off-by: example happens to be wrapped here. -EOF - cat >expect <<\EOF && -4:Subject: [PATCH] subject -8: -10:Signed-off-by: example happens to be wrapped here. -11:Signed-off-by: C O Mitter -EOF + My unfortunate + Signed-off-by: example happens to be wrapped here. + EOF + cat >expect <<-\EOF && + 4:Subject: [PATCH] subject + 8: + 10:Signed-off-by: example happens to be wrapped here. + 11:Signed-off-by: C O Mitter + EOF test_cmp expect actual ' test_expect_success 'signoff: valid S-o-b paragraph in the middle' ' - append_signoff <<\EOF >actual && -subject + append_signoff <<-\EOF >actual && + subject -Signed-off-by: my@house -Signed-off-by: your@house + Signed-off-by: my@house + Signed-off-by: your@house -A lot of houses. -EOF - cat >expect <<\EOF && -4:Subject: [PATCH] subject -8: -9:Signed-off-by: my@house -10:Signed-off-by: your@house -11: -13: -14:Signed-off-by: C O Mitter -EOF + A lot of houses. + EOF + cat >expect <<-\EOF && + 4:Subject: [PATCH] subject + 8: + 9:Signed-off-by: my@house + 10:Signed-off-by: your@house + 11: + 13: + 14:Signed-off-by: C O Mitter + EOF test_cmp expect actual ' test_expect_success 'signoff: the same signoff at the end' ' - append_signoff <<\EOF >actual && -subject + append_signoff <<-\EOF >actual && + subject -body + body -Signed-off-by: C O Mitter -EOF - cat >expect <<\EOF && -4:Subject: [PATCH] subject -8: -10: -11:Signed-off-by: C O Mitter -EOF + Signed-off-by: C O Mitter + EOF + cat >expect <<-\EOF && + 4:Subject: [PATCH] subject + 8: + 10: + 11:Signed-off-by: C O Mitter + EOF test_cmp expect actual ' test_expect_success 'signoff: the same signoff at the end, no trailing NL' ' printf "subject\n\nSigned-off-by: C O Mitter " | append_signoff >actual && - cat >expect <<\EOF && -4:Subject: [PATCH] subject -8: -9:Signed-off-by: C O Mitter -EOF + cat >expect <<-\EOF && + 4:Subject: [PATCH] subject + 8: + 9:Signed-off-by: C O Mitter + EOF test_cmp expect actual ' test_expect_success 'signoff: the same signoff NOT at the end' ' - append_signoff <<\EOF >actual && -subject + append_signoff <<-\EOF >actual && + subject -body + body -Signed-off-by: C O Mitter -Signed-off-by: my@house -EOF - cat >expect <<\EOF && -4:Subject: [PATCH] subject -8: -10: -11:Signed-off-by: C O Mitter -12:Signed-off-by: my@house -EOF + Signed-off-by: C O Mitter + Signed-off-by: my@house + EOF + cat >expect <<-\EOF && + 4:Subject: [PATCH] subject + 8: + 10: + 11:Signed-off-by: C O Mitter + 12:Signed-off-by: my@house + EOF test_cmp expect actual ' test_expect_success 'signoff: tolerate garbage in conforming footer' ' - append_signoff <<\EOF >actual && -subject + append_signoff <<-\EOF >actual && + subject -body + body -Tested-by: my@house -Some Trash -Signed-off-by: C O Mitter -EOF - cat >expect <<\EOF && -4:Subject: [PATCH] subject -8: -10: -13:Signed-off-by: C O Mitter -EOF + Tested-by: my@house + Some Trash + Signed-off-by: C O Mitter + EOF + cat >expect <<-\EOF && + 4:Subject: [PATCH] subject + 8: + 10: + 13:Signed-off-by: C O Mitter + EOF test_cmp expect actual ' test_expect_success 'signoff: respect trailer config' ' - append_signoff <<\EOF >actual && -subject + append_signoff <<-\EOF >actual && + subject -Myfooter: x -Some Trash -EOF - cat >expect <<\EOF && -4:Subject: [PATCH] subject -8: -11: -12:Signed-off-by: C O Mitter -EOF + Myfooter: x + Some Trash + EOF + cat >expect <<-\EOF && + 4:Subject: [PATCH] subject + 8: + 11: + 12:Signed-off-by: C O Mitter + EOF test_cmp expect actual && test_config trailer.Myfooter.ifexists add && - append_signoff <<\EOF >actual && -subject + append_signoff <<-\EOF >actual && + subject -Myfooter: x -Some Trash -EOF - cat >expect <<\EOF && -4:Subject: [PATCH] subject -8: -11:Signed-off-by: C O Mitter -EOF + Myfooter: x + Some Trash + EOF + cat >expect <<-\EOF && + 4:Subject: [PATCH] subject + 8: + 11:Signed-off-by: C O Mitter + EOF test_cmp expect actual ' test_expect_success 'signoff: footer begins with non-signoff without @ sign' ' - append_signoff <<\EOF >actual && -subject + append_signoff <<-\EOF >actual && + subject -body + body -Reviewed-id: Noone -Tested-by: my@house -Change-id: Ideadbeef -Signed-off-by: C O Mitter -Bug: 1234 -EOF - cat >expect <<\EOF && -4:Subject: [PATCH] subject -8: -10: -14:Signed-off-by: C O Mitter -EOF + Reviewed-id: Noone + Tested-by: my@house + Change-id: Ideadbeef + Signed-off-by: C O Mitter + Bug: 1234 + EOF + cat >expect <<-\EOF && + 4:Subject: [PATCH] subject + 8: + 10: + 14:Signed-off-by: C O Mitter + EOF test_cmp expect actual ' From patchwork Sat Aug 24 08:27:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denton Liu X-Patchwork-Id: 11112941 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 521D9912 for ; Sat, 24 Aug 2019 08:27:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2E15E2146E for ; Sat, 24 Aug 2019 08:27:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="JOWJP6jU" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727088AbfHXI1H (ORCPT ); Sat, 24 Aug 2019 04:27:07 -0400 Received: from mail-io1-f65.google.com ([209.85.166.65]:37399 "EHLO mail-io1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726072AbfHXI1H (ORCPT ); Sat, 24 Aug 2019 04:27:07 -0400 Received: by mail-io1-f65.google.com with SMTP id q22so25656915iog.4 for ; Sat, 24 Aug 2019 01:27:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=C7cvA63Mls7f/glzSnNwJN2P5f8JSKcVpFamqhfO42o=; b=JOWJP6jUsOEI06bE92HzZEc195YG7TQWYGBL8xHG3fmJ7NjhuLmVUHjVWb5TK9DhcI SFD+dFH6IS130736hYBiasNYw5Ws5SOfgbQlhKTrIbqHh7kBjaUCedimaX9ak7tccXXy NlzBBPFdHmiqFO6+edWhWWWUh2EtoY1FKp7qd+vO023OClW0K4UzlmdjkbJjR0qAIpcm cqVkxAiPmQC4cuOnIm8ShWF2dGrTFr4+/wUxJT+37MUFYxQjKzbnVLKbCM6tOwZgFUN+ Ur94eDzgWmt+poGApHcRFBKkWdvIpH6NG+s1GnLf0qfNngAhvEF2d9o1LQWUd3I7ic/c KqSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=C7cvA63Mls7f/glzSnNwJN2P5f8JSKcVpFamqhfO42o=; b=bRCZVJ7Li3cFpQ1fmhcgIKIm2e8f4fA83EgcZGfb2XEHMhu1dnZxV8az0K2sEMuAx5 ZAgJ65o+BBidaxlzUuyHYx/VOwjGenHiLo1brRZFjj6ql0zmwnLXkg1k2Y3bhK4QrF79 RBWf4YPjskerQGa18sPwIe0sn4SWp5fF+swObfIBAfbC8xC5tlDWbDM6cPAMZ6ChDwDR nBx1/sQOV41D9lxrSr81gCH0JcBuQQzaqLYC2ImePSOKMA7yxOrdVzCScQRmMntZ724Q +EM04UuhtRXNIsol7jqe66rbOAT7FJ3gvANVjC3+xiEm0NBfboys+oTh0a3nL0n2X+Bg 2DBA== X-Gm-Message-State: APjAAAWIUSGw6WzNOxm5gz4As2+5DU9CkQNkIA594xKbtbRmn18aSlpC +g9W2aPwhBz7OezE5oV+O0QC2AT0 X-Google-Smtp-Source: APXvYqwyZhJEhhiNzX/yropfYtJ54b6a0J4D55qTmC6WuyHWg0Z4I/zzF+9G6IlBoys8GH8dCLft+w== X-Received: by 2002:a02:c857:: with SMTP id r23mr8717253jao.139.1566635225936; Sat, 24 Aug 2019 01:27:05 -0700 (PDT) Received: from archbookpro.localdomain (CPE18593399858a-CM185933998587.cpe.net.cable.rogers.com. [174.112.89.95]) by smtp.gmail.com with ESMTPSA id e12sm4826527iob.66.2019.08.24.01.27.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Aug 2019 01:27:05 -0700 (PDT) Date: Sat, 24 Aug 2019 04:27:03 -0400 From: Denton Liu To: Git Mailing List Cc: =?iso-8859-1?q?=C6var_Arnfj=F6r=F0?= Bjarmason , Junio C Hamano , Eric Sunshine , Johannes Sixt , Philip Oakley Subject: [PATCH 07/13] t4014: drop redirections to /dev/null Message-ID: <804b3163f866cce0b8a928256b5009fc42dbc709.1566635008.git.liu.denton@gmail.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Since output is silenced when running without `-v` and debugging output is useful with `-v`, remove redirections to /dev/null as it is not useful. Signed-off-by: Denton Liu --- t/t4014-format-patch.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh index c07d868491..2048fb2008 100755 --- a/t/t4014-format-patch.sh +++ b/t/t4014-format-patch.sh @@ -1502,42 +1502,42 @@ test_expect_success 'cover letter using branch description (1)' ' git checkout rebuild-1 && test_config branch.rebuild-1.description hello && git format-patch --stdout --cover-letter master >actual && - grep hello actual >/dev/null + grep hello actual ' test_expect_success 'cover letter using branch description (2)' ' git checkout rebuild-1 && test_config branch.rebuild-1.description hello && git format-patch --stdout --cover-letter rebuild-1~2..rebuild-1 >actual && - grep hello actual >/dev/null + grep hello actual ' test_expect_success 'cover letter using branch description (3)' ' git checkout rebuild-1 && test_config branch.rebuild-1.description hello && git format-patch --stdout --cover-letter ^master rebuild-1 >actual && - grep hello actual >/dev/null + grep hello actual ' test_expect_success 'cover letter using branch description (4)' ' git checkout rebuild-1 && test_config branch.rebuild-1.description hello && git format-patch --stdout --cover-letter master.. >actual && - grep hello actual >/dev/null + grep hello actual ' test_expect_success 'cover letter using branch description (5)' ' git checkout rebuild-1 && test_config branch.rebuild-1.description hello && git format-patch --stdout --cover-letter -2 HEAD >actual && - grep hello actual >/dev/null + grep hello actual ' test_expect_success 'cover letter using branch description (6)' ' git checkout rebuild-1 && test_config branch.rebuild-1.description hello && git format-patch --stdout --cover-letter -2 >actual && - grep hello actual >/dev/null + grep hello actual ' test_expect_success 'cover letter with nothing' ' From patchwork Sat Aug 24 08:27:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Denton Liu X-Patchwork-Id: 11112943 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7D1D814DE for ; Sat, 24 Aug 2019 08:27:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 59E622146E for ; Sat, 24 Aug 2019 08:27:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="pCknu4+C" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727107AbfHXI1K (ORCPT ); Sat, 24 Aug 2019 04:27:10 -0400 Received: from mail-io1-f67.google.com ([209.85.166.67]:42345 "EHLO mail-io1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726072AbfHXI1J (ORCPT ); Sat, 24 Aug 2019 04:27:09 -0400 Received: by mail-io1-f67.google.com with SMTP id e20so25544172iob.9 for ; Sat, 24 Aug 2019 01:27:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=HzHM2p4PCj3fdTdY+0mjHZTAYWCWVROiB8/myMHWwY8=; b=pCknu4+CBziTYZAPX3bcTzoM8zGHYUiVCwRT8BmuU/PCT7zreWN4DQ5pGgUwy9rNSz 4/5ZiOR9LOC0BBahOwCkjco+ZvuDC1cfngBYyhZriOOYKFNGs/+fGT2SOGHGCFqDhRs3 1BiuuyLqFiVRITG+fMspEg+6J6V88iHkWGXc/2KtsndrLDWz5AjRnWcTMR8Sp4QLdc+l 2rgktLcJWdcZmqlyhgR+yiyNgkMmH19796xEIcjX3gzV2mKjLOUzFHWBh6XJkLTTPOQR zvfNIPp20Dj6z+0h2udZ5EmpX4Lla1OiIU0qaWId6kdES9ESqN0MwB0WApTqfTGqWa8N 7Vmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=HzHM2p4PCj3fdTdY+0mjHZTAYWCWVROiB8/myMHWwY8=; b=OVxVsf4/8KMR0VdyMP3PoKZF7Kxpd/qnXRLorbpXupGsq34wAYeOOiSBe1nFcoHEdN pqSLK708FkUqAWE5wCo6Eml2+ahXpMjFYk+On29S2tV5Ockuy/xf38U7+74VvIi/nko7 zQpLbeqtnTFzIdYjAH4X4sFzhcvVdlUuxMjO5r8isbEeBt0LOWsMaOD78a1kMZ9xRkwu HSzkad7Gb/wK3kXr5vrohiQK5B1URKPEn0QTndhlgBVHrDV/lMfgg6KVsx1+TtgK4FNJ ON9Es6JfRi+u0Y2h6FeNFKG0QsY9RAKqUvAjVh/7aydWPAdma9g3PDw+P98Gplw4EPyv fJjg== X-Gm-Message-State: APjAAAWaaSPNT3y5RiChV67B+wZq6+rNnEUIlIvqxfy1xkrTalJbtX7u czhuhxyZnLN4oRxVQ/A1ybksTDDW X-Google-Smtp-Source: APXvYqyBeWCakum2Cqh0CsW/eNFV+gax9g/ITzB68wTHuk2AlNUiMRLa6CJ7KG7q6HtqQVQ6Pebahw== X-Received: by 2002:a02:cc6c:: with SMTP id j12mr8747262jaq.29.1566635228473; Sat, 24 Aug 2019 01:27:08 -0700 (PDT) Received: from archbookpro.localdomain (CPE18593399858a-CM185933998587.cpe.net.cable.rogers.com. [174.112.89.95]) by smtp.gmail.com with ESMTPSA id g12sm3919477ioe.50.2019.08.24.01.27.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Aug 2019 01:27:08 -0700 (PDT) Date: Sat, 24 Aug 2019 04:27:06 -0400 From: Denton Liu To: Git Mailing List Cc: =?iso-8859-1?q?=C6var_Arnfj=F6r=F0?= Bjarmason , Junio C Hamano , Eric Sunshine , Johannes Sixt , Philip Oakley Subject: [PATCH 08/13] t4014: let sed open its own files Message-ID: <7d9a24a97972ab8a8a1cfe1f2605630e154886be.1566635008.git.liu.denton@gmail.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org In some cases, we were using a redirection operator to feed input into sed. However, since sed is capable of opening its own files and provides better error messages on IO failure, make sed open its own files instead of redirecting input into it. Signed-off-by: Denton Liu --- t/t4014-format-patch.sh | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh index 2048fb2008..35cf798847 100755 --- a/t/t4014-format-patch.sh +++ b/t/t4014-format-patch.sh @@ -596,7 +596,7 @@ EOF test_expect_success 'shortlog of cover-letter wraps overly-long onelines' ' git format-patch --cover-letter -2 && - sed -e "1,/A U Thor/d" -e "/^\$/q" <0000-cover-letter.patch >output && + sed -e "1,/A U Thor/d" -e "/^\$/q" 0000-cover-letter.patch >output && test_cmp expect output ' @@ -635,7 +635,7 @@ EOF test_expect_success 'format-patch -p suppresses stat' ' git format-patch -p -2 && - sed -e "1,/^\$/d" -e "/^+5/q" <0001-This-is-an-excessively-long-subject-line-for-a-messa.patch >output && + sed -e "1,/^\$/d" -e "/^+5/q" 0001-This-is-an-excessively-long-subject-line-for-a-messa.patch >output && test_cmp expect output ' @@ -890,7 +890,7 @@ test_expect_success 'prepare mail-signature input' ' test_expect_success '--signature-file=file works' ' git format-patch --stdout --signature-file=mail-signature -1 >output && check_patch output && - sed -e "1,/^-- \$/d" actual && + sed -e "1,/^-- \$/d" output >actual && { cat mail-signature && echo } >expect && @@ -901,7 +901,7 @@ test_expect_success 'format.signaturefile works' ' test_config format.signaturefile mail-signature && git format-patch --stdout -1 >output && check_patch output && - sed -e "1,/^-- \$/d" actual && + sed -e "1,/^-- \$/d" output >actual && { cat mail-signature && echo } >expect && @@ -923,7 +923,7 @@ test_expect_success '--signature-file overrides format.signaturefile' ' git format-patch --stdout \ --signature-file=other-mail-signature -1 >output && check_patch output && - sed -e "1,/^-- \$/d" actual && + sed -e "1,/^-- \$/d" output >actual && { cat other-mail-signature && echo } >expect && @@ -992,7 +992,7 @@ test_expect_success 'format-patch wraps extremely long subject (ascii)' ' git add file && git commit -m "$M512" && git format-patch --stdout -1 >patch && - sed -n "/^Subject/p; /^ /p; /^$/q" subject && + sed -n "/^Subject/p; /^ /p; /^$/q" patch >subject && test_cmp expect subject ' @@ -1031,7 +1031,7 @@ test_expect_success 'format-patch wraps extremely long subject (rfc2047)' ' git add file && git commit -m "$M512" && git format-patch --stdout -1 >patch && - sed -n "/^Subject/p; /^ /p; /^$/q" subject && + sed -n "/^Subject/p; /^ /p; /^$/q" patch >subject && test_cmp expect subject ' @@ -1040,7 +1040,7 @@ check_author() { git add file && GIT_AUTHOR_NAME=$1 git commit -m author-check && git format-patch --stdout -1 >patch && - sed -n "/^From: /p; /^ /p; /^$/q" actual && + sed -n "/^From: /p; /^ /p; /^$/q" patch >actual && test_cmp expect actual } @@ -1160,7 +1160,7 @@ test_expect_success '--from=ident replaces author' ' From: A U Thor EOF - sed -ne "/^From:/p; /^$/p; /^---$/q" patch.head && + sed -ne "/^From:/p; /^$/p; /^---$/q" patch >patch.head && test_cmp expect patch.head ' @@ -1172,7 +1172,7 @@ test_expect_success '--from uses committer ident' ' From: A U Thor EOF - sed -ne "/^From:/p; /^$/p; /^---$/q" patch.head && + sed -ne "/^From:/p; /^$/p; /^---$/q" patch >patch.head && test_cmp expect patch.head ' @@ -1182,7 +1182,7 @@ test_expect_success '--from omits redundant in-body header' ' From: A U Thor EOF - sed -ne "/^From:/p; /^$/p; /^---$/q" patch.head && + sed -ne "/^From:/p; /^$/p; /^---$/q" patch >patch.head && test_cmp expect patch.head ' @@ -1197,7 +1197,7 @@ test_expect_success 'in-body headers trigger content encoding' ' From: éxötìc EOF - sed -ne "/^From:/p; /^$/p; /^Content-Type/p; /^---$/q" patch.head && + sed -ne "/^From:/p; /^$/p; /^Content-Type/p; /^---$/q" patch >patch.head && test_cmp expect patch.head ' @@ -1788,7 +1788,7 @@ test_expect_success 'interdiff: cover-letter' ' git format-patch --cover-letter --interdiff=boop~2 -1 boop && test_i18ngrep "^Interdiff:$" 0000-cover-letter.patch && test_i18ngrep ! "^Interdiff:$" 0001-fleep.patch && - sed "1,/^@@ /d; /^-- $/q" <0000-cover-letter.patch >actual && + sed "1,/^@@ /d; /^-- $/q" 0000-cover-letter.patch >actual && test_cmp expect actual ' @@ -1804,7 +1804,7 @@ test_expect_success 'interdiff: solo-patch' ' EOF git format-patch --interdiff=boop~2 -1 boop && test_i18ngrep "^Interdiff:$" 0001-fleep.patch && - sed "1,/^ @@ /d; /^$/q" <0001-fleep.patch >actual && + sed "1,/^ @@ /d; /^$/q" 0001-fleep.patch >actual && test_cmp expect actual ' From patchwork Sat Aug 24 08:27:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denton Liu X-Patchwork-Id: 11112945 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7C8D0912 for ; Sat, 24 Aug 2019 08:27:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4FB2821670 for ; Sat, 24 Aug 2019 08:27:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Dv+o0vqh" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727119AbfHXI1M (ORCPT ); Sat, 24 Aug 2019 04:27:12 -0400 Received: from mail-io1-f68.google.com ([209.85.166.68]:38673 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726072AbfHXI1M (ORCPT ); Sat, 24 Aug 2019 04:27:12 -0400 Received: by mail-io1-f68.google.com with SMTP id p12so25687669iog.5 for ; Sat, 24 Aug 2019 01:27:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=PdNpr+xjrLYU2MoWEBNF3xcNAmtPLys44nVVsueTa5k=; b=Dv+o0vqhcGDfHflHOuWApgHbl74XnITb6ae1bvfuBktGJtZhGz2S7wAJZTdYpCJyff lvcNTff92AP3lLATzCi+Foqc7Om6oRHKRZN2od1noozHtv3z53+1el+KVBTE8EmZT+PP 0k1maUx42EyI15RC+VEzDup7kg8Julewwy614pR60MWOw7AY50best4ddnWacrmK/hYi 2P04RvXQxUsSawAxzERH3pg5sOvE7RkaEK5pY3ZPoyjlqLEltLGtUp0Z1GWlg7dXZWUv dkW9JXAELmqbw43f/jH5jYHyGLbV5Kcbh2QQfQv8jg61xgD+Cizhh79+zXNK4DpvxgTC BVEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=PdNpr+xjrLYU2MoWEBNF3xcNAmtPLys44nVVsueTa5k=; b=H2v4CfM38sr5QawFU3ETiDF6H2vMvrgC8PVie+EdQBtnmr5Vgolw7nEF3AC+0QHjlD I8aijEPReuPEJUIlw5f/5y2j5NZOGtysMwPh3ahkns5be5MauWEJOUWaNgrOxOHmEhis 05DrCg6Mm40hlIRpOD7LduVE7hnkU4Kj/waM39YYj9+GB/qA6IjhNcYvBKY5fK7MmW/C a7HjcSxRq2wLEEeMGnLmoCNtN4dIhMSRQojMpUM4XuRPDbMNqEEcpEy2GYY+KamkYbEy JX0MPPP0EMgARTS1qULd83znAs+oZ9CBqWm7OfcjL9fmI0gBgjJQttrIWpxpiWRPfwbP bvkg== X-Gm-Message-State: APjAAAU0WKiF4xbJ1KX5evTV+OXWUI8qaGPpa/Kp0NHq80baGNjmCcWe 8ixFTGTS4jsweyrDByikdNYycX5m X-Google-Smtp-Source: APXvYqzVWB80ZyKT1E5ON19W8gHRAoVn9dMDf/SZl03Xt2h3nYT6/BjBXE6uXvfBQOEbuMjrSanO/Q== X-Received: by 2002:a5d:8908:: with SMTP id b8mr12328694ion.237.1566635231066; Sat, 24 Aug 2019 01:27:11 -0700 (PDT) Received: from archbookpro.localdomain (CPE18593399858a-CM185933998587.cpe.net.cable.rogers.com. [174.112.89.95]) by smtp.gmail.com with ESMTPSA id s12sm4682572ios.31.2019.08.24.01.27.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Aug 2019 01:27:10 -0700 (PDT) Date: Sat, 24 Aug 2019 04:27:08 -0400 From: Denton Liu To: Git Mailing List Cc: =?iso-8859-1?q?=C6var_Arnfj=F6r=F0?= Bjarmason , Junio C Hamano , Eric Sunshine , Johannes Sixt , Philip Oakley Subject: [PATCH 09/13] t4014: use test_line_count() where possible Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Convert all instances of `cnt=$(... | wc -l) && test $cnt = N` into uses of `test_line_count()`. While we're at it, convert one instance of a Git command upstream of a pipe into two commands. This prevents a failure of a Git command from being masked since only the return code of the last member of the pipe is shown. Signed-off-by: Denton Liu --- t/t4014-format-patch.sh | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh index 35cf798847..18142ee5fa 100755 --- a/t/t4014-format-patch.sh +++ b/t/t4014-format-patch.sh @@ -60,23 +60,23 @@ test_expect_success setup ' test_expect_success 'format-patch --ignore-if-in-upstream' ' git format-patch --stdout master..side >patch0 && - cnt=$(grep "^From " patch0 | wc -l) && - test $cnt = 3 + grep "^From " patch0 >from0 && + test_line_count = 3 from0 ' test_expect_success 'format-patch --ignore-if-in-upstream' ' git format-patch --stdout \ --ignore-if-in-upstream master..side >patch1 && - cnt=$(grep "^From " patch1 | wc -l) && - test $cnt = 2 + grep "^From " patch1 >from1 && + test_line_count = 2 from1 ' test_expect_success 'format-patch --ignore-if-in-upstream handles tags' ' git tag -a v1 -m tag side && git tag -a v2 -m tag master && git format-patch --stdout --ignore-if-in-upstream v2..v1 >patch1 && - cnt=$(grep "^From " patch1 | wc -l) && - test $cnt = 2 + grep "^From " patch1 >from1 && + test_line_count = 2 from1 ' test_expect_success "format-patch doesn't consider merge commits" ' @@ -90,22 +90,23 @@ test_expect_success "format-patch doesn't consider merge commits" ' git checkout -b merger master && test_tick && git merge --no-ff slave && - cnt=$(git format-patch -3 --stdout | grep "^From " | wc -l) && - test $cnt = 3 + git format-patch -3 --stdout >patch && + grep "^From " patch >from && + test_line_count = 3 from ' test_expect_success 'format-patch result applies' ' git checkout -b rebuild-0 master && git am -3 patch0 && - cnt=$(git rev-list master.. | wc -l) && - test $cnt = 2 + git rev-list master.. >list && + test_line_count = 2 list ' test_expect_success 'format-patch --ignore-if-in-upstream result applies' ' git checkout -b rebuild-1 master && git am -3 patch1 && - cnt=$(git rev-list master.. | wc -l) && - test $cnt = 2 + git rev-list master.. >list && + test_line_count = 2 list ' test_expect_success 'commit did not screw up the log message' ' @@ -795,7 +796,8 @@ test_expect_success 'options no longer allowed for format-patch' ' test_expect_success 'format-patch --numstat should produce a patch' ' git format-patch --numstat --stdout master..side >output && - test 5 = $(grep "^diff --git a/" output | wc -l) + grep "^diff --git a/" output >diff && + test_line_count = 5 diff ' test_expect_success 'format-patch -- ' ' @@ -852,8 +854,8 @@ test_expect_success 'format-patch --signature --cover-letter' ' git config --unset-all format.signature && git format-patch --stdout --signature="my sig" --cover-letter \ -1 >output && - grep "my sig" output && - test 2 = $(grep "my sig" output | wc -l) + grep "my sig" output >sig && + test_line_count = 2 sig ' test_expect_success 'format.signature="" suppresses signatures' ' @@ -1591,7 +1593,8 @@ test_expect_success 'format-patch format.outputDirectory option' ' test_config format.outputDirectory patches && rm -fr patches && git format-patch master..side && - test $(git rev-list master..side | wc -l) -eq $(ls patches | wc -l) + git rev-list master..side >list && + test_line_count = $(ls patches | wc -l) list ' test_expect_success 'format-patch -o overrides format.outputDirectory' ' From patchwork Sat Aug 24 08:27:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denton Liu X-Patchwork-Id: 11112947 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5A45C912 for ; Sat, 24 Aug 2019 08:27:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 37FCA21670 for ; Sat, 24 Aug 2019 08:27:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bXYUr6Sc" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727141AbfHXI1P (ORCPT ); Sat, 24 Aug 2019 04:27:15 -0400 Received: from mail-io1-f52.google.com ([209.85.166.52]:33490 "EHLO mail-io1-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726072AbfHXI1O (ORCPT ); Sat, 24 Aug 2019 04:27:14 -0400 Received: by mail-io1-f52.google.com with SMTP id z3so25699485iog.0 for ; Sat, 24 Aug 2019 01:27:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=XVN3uoweg9olm4lkkysRDVARDiy1wDmhHAGBz6iSCUo=; b=bXYUr6ScwYB0tOTp85ju1O87fwnX+xyDSPdxx5vF5YoQ+ry7ieZ4OPXmhvPwzVKnfH jcMTtsSyec2at2GL73BbvqMmBmUNPuQ+8Xfyfm0GHETDVZEuqBDu+7uJjbeqaUCElqzo 54KvDHpibYhRtU7Ongt8ftWYi+CjqA6sQ9hM122p9/eleZe5lwOWC9ByrAY9CkFiDNPX VkS4OFeVdf1HAAWyKbUFSWPt88oRhPWB3mV2vN6AiVShHWj0NPAgNesJeqkWh1Ji2L5Y 8jqDl1gRPQNVOxjdIG18oSSVG0MdrVmLwdsetsSfoCDvVXlq3/4fGJYj3U55T64WC3cY UawA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=XVN3uoweg9olm4lkkysRDVARDiy1wDmhHAGBz6iSCUo=; b=iRaq2P+0oEzH5kFgZF3Zbco6qLDGYEX/dFMTAXPAlzL8Tnrg36cIiqZXsV5hteRCRT Fb/Fl67hJny/AaAMjOe2uFiybRyJ+QlyptTDaSjo35SaaQ1BXCFAQzlf8OOgv/lxXMh6 5LbLZJ/aRl7tC3yj9ieM1TPgKZT6kG9jpSZJQhWS2XL9St3zOYCl4H+YCB16iHc2JLOY 4EyItlJckW/LyHUXKPy/63iE6BHRghJwt/NWLaRp7PqwWskWFOwMYJrP1cbC9RJH9Gm7 3aGw7VlgxLsCs5gcEmiQqiQpzof8gzKHKvLOTv6WHJndtH9X3wF7jvVCxwedj9S09Xof 6QVw== X-Gm-Message-State: APjAAAWufSm5NxhUHZ9rfNDLSJ/XYBTLsZC18Mf/7gW+JIvzvlFgULFW IDBbzkIUMsth9XYb/cVVWZW2/Coe X-Google-Smtp-Source: APXvYqzOnsUqGwDJCRN/d2C4IuMaxMefcI7u5j8fB16lCeE8lDYduyRu3yuzYXpb6Ctq7i5snOTUmQ== X-Received: by 2002:a6b:c94c:: with SMTP id z73mr12770315iof.84.1566635233387; Sat, 24 Aug 2019 01:27:13 -0700 (PDT) Received: from archbookpro.localdomain (CPE18593399858a-CM185933998587.cpe.net.cable.rogers.com. [174.112.89.95]) by smtp.gmail.com with ESMTPSA id j1sm3572176iop.14.2019.08.24.01.27.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Aug 2019 01:27:13 -0700 (PDT) Date: Sat, 24 Aug 2019 04:27:11 -0400 From: Denton Liu To: Git Mailing List Cc: =?iso-8859-1?q?=C6var_Arnfj=F6r=F0?= Bjarmason , Junio C Hamano , Eric Sunshine , Johannes Sixt , Philip Oakley Subject: [PATCH 10/13] t4014: remove confusing pipe in check_threading() Message-ID: <6a9409cee036f3ded3b88540959dc4d05a3ced12.1566635008.git.liu.denton@gmail.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org In check_threading(), there was a Git command in the upstream of a pipe. In order to not lose its status code, it was saved into a file. However, this may be confusing so rewrite to redirect IO to file. This allows us to directly use the conventional &&-chain. Signed-off-by: Denton Liu --- t/t4014-format-patch.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh index 18142ee5fa..67f4c62ed6 100755 --- a/t/t4014-format-patch.sh +++ b/t/t4014-format-patch.sh @@ -319,7 +319,7 @@ test_expect_success 'reroll count (-v)' ' check_threading () { expect="$1" && shift && - (git format-patch --stdout "$@"; echo $? >status.out) | + git format-patch --stdout "$@" >patch && # Prints everything between the Message-ID and In-Reply-To, # and replaces all Message-ID-lookalikes by a sequence number perl -ne ' @@ -334,8 +334,7 @@ check_threading () { print; } print "---\n" if /^From /i; - ' >actual && - test 0 = "$(cat status.out)" && + ' actual && test_cmp "$expect" actual } From patchwork Sat Aug 24 08:27:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Denton Liu X-Patchwork-Id: 11112949 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E44C614DE for ; Sat, 24 Aug 2019 08:27:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id ADB812146E for ; Sat, 24 Aug 2019 08:27:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="vRnLIHiy" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727206AbfHXI1R (ORCPT ); Sat, 24 Aug 2019 04:27:17 -0400 Received: from mail-io1-f66.google.com ([209.85.166.66]:45928 "EHLO mail-io1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727147AbfHXI1R (ORCPT ); Sat, 24 Aug 2019 04:27:17 -0400 Received: by mail-io1-f66.google.com with SMTP id t3so25545550ioj.12 for ; Sat, 24 Aug 2019 01:27:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=Z5KZm5ZG2tXk0hXUpg0lCKsRPTIfsSyVLHua7cQOfxg=; b=vRnLIHiyHORIyX3uzHXG9bJqeTZmTyCMBccQiU3SWi6Dotp2et7TmpSdRXkK2gkssC 5VmF1aVCrHh/JrCcBaz15h7qfDMFmUeLkpW9wGnk0ulEnRL7NRUhbx5EpcIkzWeB968F cg/G/KuY62GCyhgxTW2GZrKITZ/hvp67XLwSg3+Ip7dFS8O5kTrfucfyfbd0+pE+dwNU nPkrDoVnxyiQwg6RJDLxtQ/4Dl1NJJQuzMZG6+dGHYxZwWl1a5CkNZQA6K6PaRhNuz3r C0WNNFVel1A+VM/hHFoePMcQ3Qh2YMl+OMe71ZXjuJPI91k4wGLpXtYEjxNYP8eAWsbC yahg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=Z5KZm5ZG2tXk0hXUpg0lCKsRPTIfsSyVLHua7cQOfxg=; b=deGqVSJXLr/74dcIOQ4ifsjOvAdPn+WQee+fMkYOLiJ/A/OO3OU+VWf6bjtYr5YVni HIAOo5D0ULW5If4D79e4rGVAKGhKZYQyAHsj0QSS+p2MTIe0z9Hmc/WzcHfU4IRrHJsp C24isyhJOJofS3QA/ec2Z4Oql6/vYs05U5RIYgKppyCVCeUnOuRuaIwVvcvvBjaPg7+7 HkdAyGJ9Qd19JjLBZBnCwPeoXL3J4ohGz/OnGjOBv8LdURAX8yU4SIeVhX8n1c79KUWC elBYzSa3NLSV5O1MTTLKrSepDmeCGEc/nJ8pdt8sLRuIxwhmFgtuEFwM5zBZviI2xMeN tgGg== X-Gm-Message-State: APjAAAVz/rFZQob5kEinpLrAa++3Q69j+s1dsS+T/HDK0VdME+ANdw5M Apcq2KgoTaCOu4/dovi24fH+JSc0 X-Google-Smtp-Source: APXvYqw4k3aPzQA1mnIktmV1+QUggMHSjmHCH5Ans322JdDU3D9kWIAJ1aeZ8MVufUiWOJOftWyDMQ== X-Received: by 2002:a5e:8e08:: with SMTP id a8mr4860259ion.94.1566635235744; Sat, 24 Aug 2019 01:27:15 -0700 (PDT) Received: from archbookpro.localdomain (CPE18593399858a-CM185933998587.cpe.net.cable.rogers.com. [174.112.89.95]) by smtp.gmail.com with ESMTPSA id q12sm4106402ioh.8.2019.08.24.01.27.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Aug 2019 01:27:15 -0700 (PDT) Date: Sat, 24 Aug 2019 04:27:13 -0400 From: Denton Liu To: Git Mailing List Cc: =?iso-8859-1?q?=C6var_Arnfj=F6r=F0?= Bjarmason , Junio C Hamano , Eric Sunshine , Johannes Sixt , Philip Oakley Subject: [PATCH 11/13] t4014: stop losing return codes of git commands Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Currently, there are two ways where the return codes of Git commands are lost. The first way is when a command is in the upstream of a pipe. In a pipe, only the return code of the last command is used. Thus, all other commands will have their return codes masked. Rewrite pipes so that there are no Git commands upstream. The other way is when a command is in a non-assignment subshell. The return code will be lost in favour of the surrounding command's. Rewrite instances of this such that Git commands output to a file and surrounding commands only call subshells with non-Git commands. Signed-off-by: Denton Liu --- t/t4014-format-patch.sh | 197 ++++++++++++++++++++++++---------------- 1 file changed, 120 insertions(+), 77 deletions(-) diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh index 67f4c62ed6..83f52614d3 100755 --- a/t/t4014-format-patch.sh +++ b/t/t4014-format-patch.sh @@ -33,7 +33,8 @@ test_expect_success setup ' git commit -m "Side changes #3 with \\n backslash-n in it." && git checkout master && - git diff-tree -p C2 | git apply --index && + git diff-tree -p C2 >patch && + git apply --index actual && + grep "^Side .* with .* backslash-n" actual ' test_expect_success 'format-patch did not screw up the log message' ' @@ -119,7 +121,8 @@ test_expect_success 'format-patch did not screw up the log message' ' ' test_expect_success 'replay did not screw up the log message' ' - git cat-file commit rebuild-1 | grep "^Side .* with .* backslash-n" + git cat-file commit rebuild-1 >actual && + grep "^Side .* with .* backslash-n" actual ' test_expect_success 'extra headers' ' @@ -153,63 +156,73 @@ test_expect_success 'extra headers with multiple To:s' ' test_expect_success 'additional command line cc (ascii)' ' git config --replace-all format.headers "Cc: R E Cipient " && - git format-patch --cc="S E Cipient " --stdout master..side | sed -e "/^\$/q" >patch5 && - grep "^Cc: R E Cipient ,\$" patch5 && - grep "^ *S E Cipient \$" patch5 + git format-patch --cc="S E Cipient " --stdout master..side >patch5 && + sed -e "/^\$/q" patch5 >hdrs5 && + grep "^Cc: R E Cipient ,\$" hdrs5 && + grep "^ *S E Cipient \$" hdrs5 ' test_expect_failure 'additional command line cc (rfc822)' ' git config --replace-all format.headers "Cc: R E Cipient " && - git format-patch --cc="S. E. Cipient " --stdout master..side | sed -e "/^\$/q" >patch5 && - grep "^Cc: R E Cipient ,\$" patch5 && - grep "^ *\"S. E. Cipient\" \$" patch5 + git format-patch --cc="S. E. Cipient " --stdout master..side >patch5 && + sed -e "/^\$/q" patch5 >hdrs5 && + grep "^Cc: R E Cipient ,\$" hdrs5 && + grep "^ *\"S. E. Cipient\" \$" hdrs5 ' test_expect_success 'command line headers' ' git config --unset-all format.headers && - git format-patch --add-header="Cc: R E Cipient " --stdout master..side | sed -e "/^\$/q" >patch6 && - grep "^Cc: R E Cipient \$" patch6 + git format-patch --add-header="Cc: R E Cipient " --stdout master..side >patch6 && + sed -e "/^\$/q" patch6 >hdrs6 && + grep "^Cc: R E Cipient \$" hdrs6 ' test_expect_success 'configuration headers and command line headers' ' git config --replace-all format.headers "Cc: R E Cipient " && - git format-patch --add-header="Cc: S E Cipient " --stdout master..side | sed -e "/^\$/q" >patch7 && - grep "^Cc: R E Cipient ,\$" patch7 && - grep "^ *S E Cipient \$" patch7 + git format-patch --add-header="Cc: S E Cipient " --stdout master..side >patch7 && + sed -e "/^\$/q" patch7 >hdrs7 && + grep "^Cc: R E Cipient ,\$" hdrs7 && + grep "^ *S E Cipient \$" hdrs7 ' test_expect_success 'command line To: header (ascii)' ' git config --unset-all format.headers && - git format-patch --to="R E Cipient " --stdout master..side | sed -e "/^\$/q" >patch8 && - grep "^To: R E Cipient \$" patch8 + git format-patch --to="R E Cipient " --stdout master..side >patch8 && + sed -e "/^\$/q" patch8 >hdrs8 && + grep "^To: R E Cipient \$" hdrs8 ' test_expect_failure 'command line To: header (rfc822)' ' - git format-patch --to="R. E. Cipient " --stdout master..side | sed -e "/^\$/q" >patch8 && - grep "^To: \"R. E. Cipient\" \$" patch8 + git format-patch --to="R. E. Cipient " --stdout master..side >patch8 && + sed -e "/^\$/q" patch8 >hdrs8 && + grep "^To: \"R. E. Cipient\" \$" hdrs8 ' test_expect_failure 'command line To: header (rfc2047)' ' - git format-patch --to="R Ä Cipient " --stdout master..side | sed -e "/^\$/q" >patch8 && - grep "^To: =?UTF-8?q?R=20=C3=84=20Cipient?= \$" patch8 + git format-patch --to="R Ä Cipient " --stdout master..side >patch8 && + sed -e "/^\$/q" patch8 >hdrs8 && + grep "^To: =?UTF-8?q?R=20=C3=84=20Cipient?= \$" hdrs8 ' test_expect_success 'configuration To: header (ascii)' ' git config format.to "R E Cipient " && - git format-patch --stdout master..side | sed -e "/^\$/q" >patch9 && - grep "^To: R E Cipient \$" patch9 + git format-patch --stdout master..side >patch9 && + sed -e "/^\$/q" patch9 >hdrs9 && + grep "^To: R E Cipient \$" hdrs9 ' test_expect_failure 'configuration To: header (rfc822)' ' git config format.to "R. E. Cipient " && - git format-patch --stdout master..side | sed -e "/^\$/q" >patch9 && - grep "^To: \"R. E. Cipient\" \$" patch9 + git format-patch --stdout master..side >patch9 && + sed -e "/^\$/q" patch9 >hdrs9 && + grep "^To: \"R. E. Cipient\" \$" hdrs9 ' test_expect_failure 'configuration To: header (rfc2047)' ' git config format.to "R Ä Cipient " && - git format-patch --stdout master..side | sed -e "/^\$/q" >patch9 && - grep "^To: =?UTF-8?q?R=20=C3=84=20Cipient?= \$" patch9 + git format-patch --stdout master..side >patch9 && + sed -e "/^\$/q" patch9 >hdrs9 && + grep "^To: =?UTF-8?q?R=20=C3=84=20Cipient?= \$" hdrs9 ' # check_patch : Verify that looks like a half-sane @@ -221,76 +234,76 @@ check_patch () { } test_expect_success 'format.from=false' ' - git -c format.from=false format-patch --stdout master..side | - sed -e "/^\$/q" >patch && + git -c format.from=false format-patch --stdout master..side >patch && + sed -e "/^\$/q" patch >hdrs && check_patch patch && - ! grep "^From: C O Mitter \$" patch + ! grep "^From: C O Mitter \$" hdrs ' test_expect_success 'format.from=true' ' - git -c format.from=true format-patch --stdout master..side | - sed -e "/^\$/q" >patch && - check_patch patch && - grep "^From: C O Mitter \$" patch + git -c format.from=true format-patch --stdout master..side >patch && + sed -e "/^\$/q" patch >hdrs && + check_patch hdrs && + grep "^From: C O Mitter \$" hdrs ' test_expect_success 'format.from with address' ' - git -c format.from="F R Om " format-patch --stdout master..side | - sed -e "/^\$/q" >patch && - check_patch patch && - grep "^From: F R Om \$" patch + git -c format.from="F R Om " format-patch --stdout master..side >patch && + sed -e "/^\$/q" patch >hdrs && + check_patch hdrs && + grep "^From: F R Om \$" hdrs ' test_expect_success '--no-from overrides format.from' ' - git -c format.from="F R Om " format-patch --no-from --stdout master..side | - sed -e "/^\$/q" >patch && - check_patch patch && - ! grep "^From: F R Om \$" patch + git -c format.from="F R Om " format-patch --no-from --stdout master..side >patch && + sed -e "/^\$/q" patch >hdrs && + check_patch hdrs && + ! grep "^From: F R Om \$" hdrs ' test_expect_success '--from overrides format.from' ' - git -c format.from="F R Om " format-patch --from --stdout master..side | - sed -e "/^\$/q" >patch && - check_patch patch && - ! grep "^From: F R Om \$" patch + git -c format.from="F R Om " format-patch --from --stdout master..side >patch && + sed -e "/^\$/q" patch >hdrs && + check_patch hdrs && + ! grep "^From: F R Om \$" hdrs ' test_expect_success '--no-to overrides config.to' ' git config --replace-all format.to \ "R E Cipient " && - git format-patch --no-to --stdout master..side | - sed -e "/^\$/q" >patch10 && - check_patch patch10 && - ! grep "^To: R E Cipient \$" patch10 + git format-patch --no-to --stdout master..side >patch10 && + sed -e "/^\$/q" patch10 >hdrs10 && + check_patch hdrs10 && + ! grep "^To: R E Cipient \$" hdrs10 ' test_expect_success '--no-to and --to replaces config.to' ' git config --replace-all format.to \ "Someone " && git format-patch --no-to --to="Someone Else " \ - --stdout master..side | - sed -e "/^\$/q" >patch11 && - check_patch patch11 && - ! grep "^To: Someone \$" patch11 && - grep "^To: Someone Else \$" patch11 + --stdout master..side >patch11 && + sed -e "/^\$/q" patch11 >hdrs11 && + check_patch hdrs11 && + ! grep "^To: Someone \$" hdrs11 && + grep "^To: Someone Else \$" hdrs11 ' test_expect_success '--no-cc overrides config.cc' ' git config --replace-all format.cc \ "C E Cipient " && - git format-patch --no-cc --stdout master..side | - sed -e "/^\$/q" >patch12 && - check_patch patch12 && - ! grep "^Cc: C E Cipient \$" patch12 + git format-patch --no-cc --stdout master..side >patch12 && + sed -e "/^\$/q" patch12 >hdrs12 && + check_patch hdrs12 && + ! grep "^Cc: C E Cipient \$" hdrs12 ' test_expect_success '--no-add-header overrides config.headers' ' git config --replace-all format.headers \ "Header1: B E Cipient " && - git format-patch --no-add-header --stdout master..side | - sed -e "/^\$/q" >patch13 && - check_patch patch13 && - ! grep "^Header1: B E Cipient \$" patch13 + git format-patch --no-add-header --stdout master..side >patch13 && + sed -e "/^\$/q" patch13 >hdrs13 && + check_patch hdrs13 && + ! grep "^Header1: B E Cipient \$" hdrs13 ' test_expect_success 'multiple files' ' @@ -808,20 +821,25 @@ test_expect_success 'format-patch --ignore-if-in-upstream HEAD' ' git format-patch --ignore-if-in-upstream HEAD ' -git_version="$(git --version | sed "s/.* //")" +test_expect_success 'get git version' ' + git_version=$(git --version) && + git_version=${git_version##* } +' signature() { printf "%s\n%s\n\n" "-- " "${1:-$git_version}" } test_expect_success 'format-patch default signature' ' - git format-patch --stdout -1 | tail -n 3 >output && + git format-patch --stdout -1 >patch && + tail -n 3 patch >output && signature >expect && test_cmp expect output ' test_expect_success 'format-patch --signature' ' - git format-patch --stdout --signature="my sig" -1 | tail -n 3 >output && + git format-patch --stdout --signature="my sig" -1 >patch && + tail -n 3 patch >output && signature "my sig" >expect && test_cmp expect output ' @@ -1606,19 +1624,40 @@ test_expect_success 'format-patch -o overrides format.outputDirectory' ' test_expect_success 'format-patch --base' ' git checkout patchid && - git format-patch --stdout --base=HEAD~3 -1 | tail -n 7 >actual1 && - git format-patch --stdout --base=HEAD~3 HEAD~.. | tail -n 7 >actual2 && + + git format-patch --stdout --base=HEAD~3 -1 >patch && + tail -n 7 patch >actual1 && + + git format-patch --stdout --base=HEAD~3 HEAD~.. >patch && + tail -n 7 patch >actual2 && + echo >expect && - echo "base-commit: $(git rev-parse HEAD~3)" >>expect && - echo "prerequisite-patch-id: $(git show --patch HEAD~2 | git patch-id --stable | awk "{print \$1}")" >>expect && - echo "prerequisite-patch-id: $(git show --patch HEAD~1 | git patch-id --stable | awk "{print \$1}")" >>expect && + git rev-parse HEAD~3 >commit-id-base && + echo "base-commit: $(cat commit-id-base)" >>expect && + + git show --patch HEAD~2 >patch && + git patch-id --stable patch.id.raw && + awk "{print \"prerequisite-patch-id:\", \$1}" >expect && + + git show --patch HEAD~1 >patch && + git patch-id --stable patch.id.raw && + awk "{print \"prerequisite-patch-id:\", \$1}" >expect && + signature >>expect && test_cmp expect actual1 && test_cmp expect actual2 && + echo >fail && - echo "base-commit: $(git rev-parse HEAD~3)" >>fail && - echo "prerequisite-patch-id: $(git show --patch HEAD~2 | git patch-id --unstable | awk "{print \$1}")" >>fail && - echo "prerequisite-patch-id: $(git show --patch HEAD~1 | git patch-id --unstable | awk "{print \$1}")" >>fail && + echo "base-commit: $(cat commit-id-base)" >>fail && + + git show --patch HEAD~2 >patch && + git patch-id --unstable patch.id.raw && + awk "{print \"prerequisite-patch-id:\", \$1}" >fail && + + git show --patch HEAD~1 >patch && + git patch-id --unstable patch.id.raw && + awk "{print \"prerequisite-patch-id:\", \$1}" >fail && + signature >>fail && ! test_cmp fail actual1 && ! test_cmp fail actual2 @@ -1629,7 +1668,8 @@ test_expect_success 'format-patch --base errors out when base commit is in revis test_must_fail git format-patch --base=HEAD~1 -2 && git format-patch --stdout --base=HEAD~2 -2 >patch && grep "^base-commit:" patch >actual && - echo "base-commit: $(git rev-parse HEAD~2)" >expect && + git rev-parse HEAD~2 >commit-id-base && + echo "base-commit: $(cat commit-id-base)" >expect && test_cmp expect actual ' @@ -1668,7 +1708,8 @@ test_expect_success 'format-patch --base=auto' ' test_commit N2 && git format-patch --stdout --base=auto -2 >patch && grep "^base-commit:" patch >actual && - echo "base-commit: $(git rev-parse upstream)" >expect && + git rev-parse upstream >commit-id-base && + echo "base-commit: $(cat commit-id-base)" >expect && test_cmp expect actual ' @@ -1705,7 +1746,8 @@ test_expect_success 'format-patch format.useAutoBaseoption' ' git config format.useAutoBase true && git format-patch --stdout -1 >patch && grep "^base-commit:" patch >actual && - echo "base-commit: $(git rev-parse upstream)" >expect && + git rev-parse upstream >commit-id-base && + echo "base-commit: $(cat commit-id-base)" >expect && test_cmp expect actual ' @@ -1714,7 +1756,8 @@ test_expect_success 'format-patch --base overrides format.useAutoBase' ' git config format.useAutoBase true && git format-patch --stdout --base=HEAD~1 -1 >patch && grep "^base-commit:" patch >actual && - echo "base-commit: $(git rev-parse HEAD~1)" >expect && + git rev-parse HEAD~1 >commit-id-base && + echo "base-commit: $(cat commit-id-base)" >expect && test_cmp expect actual ' From patchwork Sat Aug 24 08:27:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denton Liu X-Patchwork-Id: 11112951 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 222A114DE for ; Sat, 24 Aug 2019 08:27:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F37F82146E for ; Sat, 24 Aug 2019 08:27:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="dHC3DEvl" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727286AbfHXI1U (ORCPT ); Sat, 24 Aug 2019 04:27:20 -0400 Received: from mail-io1-f68.google.com ([209.85.166.68]:38695 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726072AbfHXI1T (ORCPT ); Sat, 24 Aug 2019 04:27:19 -0400 Received: by mail-io1-f68.google.com with SMTP id p12so25688063iog.5 for ; Sat, 24 Aug 2019 01:27:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=t4FscKSUAFYJROFmnFKe37tWakj/S+S0ILgO/AMRiXs=; b=dHC3DEvlIO5ylHbxxgaqvV3HztM21l6nM+URWwDUn/5PIx88BofYoiH0o0MvGvvYkY 39l//AlZpRysCyeouf8e7X9tlVm/0LZA8r7F6Ci6RdVKPCwWBbAkQpcCH4RYM4lYqZH6 BSDEB8HpHr38rEGXHo5iCZaeZRdf3PJzkU/tf8p0tn7ZRitmuhE44wnCgeAMYUo8NGJ3 NscUqzbqvP3TcRNbFdvbPEjuoEcEfnUli3Suc1jIFx8ahR/eBJO29OlApEwgy/eVLie3 IEog0erFNlBHXYzD8yhu9nT8LTDQ5CCPuteKDweeGzHmU/IfTEl6Kbq86u6ErJI+iu6G XdDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=t4FscKSUAFYJROFmnFKe37tWakj/S+S0ILgO/AMRiXs=; b=ZF+IV1AOQ89RWenVHrkxksVTT/462Xwe12hwdu9dvsLU9ltM61nhzPTmAqhJxfhVv9 lShISmkmSsRj7WtHx9kDEqtNkrud3aYSAPAt6J+LSYKeURKBf6Hf+bxrcG5UcEcqTE3E VjuTlJlUVChnPmEjoMEPr2L+Y9YKmQUOdB81on6JrnWdTaHfJcWiEdJn4Le2xvFxgcbX 8g8XN3k2ugpCYmzpicsPYnOl/xlGwppLBxMVc5eCideg2VA3VJQUDVh2ElPeMj6unH7S iRqOVRahQOL4KlPfj13LGc+uwVZ79Y8CjOMc7xp2jXdsblxbjzynqgUlSkC1k4NhS115 5rIQ== X-Gm-Message-State: APjAAAWoytLGDiDFPSid/gAwChSOTUdkp/xDQi6Dhn8W3T2MrJLDET8z x62NlaZ2/pyjKVg8elBlWAt63xfv X-Google-Smtp-Source: APXvYqxC5zqrt3j2N5gmxDQRytgI0OzNopmKwazQYe2EBxWGfs4pNezL2wxOA6R2fvNjVU38Ste9XQ== X-Received: by 2002:a5d:9c08:: with SMTP id 8mr4241457ioe.9.1566635238218; Sat, 24 Aug 2019 01:27:18 -0700 (PDT) Received: from archbookpro.localdomain (CPE18593399858a-CM185933998587.cpe.net.cable.rogers.com. [174.112.89.95]) by smtp.gmail.com with ESMTPSA id q3sm4267265ios.70.2019.08.24.01.27.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Aug 2019 01:27:17 -0700 (PDT) Date: Sat, 24 Aug 2019 04:27:15 -0400 From: Denton Liu To: Git Mailing List Cc: =?iso-8859-1?q?=C6var_Arnfj=F6r=F0?= Bjarmason , Junio C Hamano , Eric Sunshine , Johannes Sixt , Philip Oakley Subject: [PATCH 12/13] Doc: add more detail for git-format-patch Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org In git-format-patch.txt, we were missing some key user information. First of all, document the special value of `--base=auto`. Next, while we're at it, surround option arguments with <>. Finally, document the `format.outputDirectory` config and change `format.coverletter` to use camel case. Signed-off-by: Denton Liu --- Documentation/git-format-patch.txt | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/Documentation/git-format-patch.txt b/Documentation/git-format-patch.txt index b9b97e63ae..95bc4d53ca 100644 --- a/Documentation/git-format-patch.txt +++ b/Documentation/git-format-patch.txt @@ -17,9 +17,9 @@ SYNOPSIS [--signature-file=] [-n | --numbered | -N | --no-numbered] [--start-number ] [--numbered-files] - [--in-reply-to=Message-Id] [--suffix=.] + [--in-reply-to=] [--suffix=.] [--ignore-if-in-upstream] - [--rfc] [--subject-prefix=Subject-Prefix] + [--rfc] [--subject-prefix=] [(--reroll-count|-v) ] [--to=] [--cc=] [--[no-]cover-letter] [--quiet] @@ -159,7 +159,7 @@ Beware that the default for 'git send-email' is to thread emails itself. If you want `git format-patch` to take care of threading, you will want to ensure that threading is disabled for `git send-email`. ---in-reply-to=Message-Id:: +--in-reply-to=:: Make the first mail (or all the mails with `--no-thread`) appear as a reply to the given Message-Id, which avoids breaking threads to provide a new patch series. @@ -314,7 +314,8 @@ you can use `--suffix=-patch` to get `0001-description-of-my-change-patch`. --base=:: Record the base tree information to identify the state the patch series applies to. See the BASE TREE INFORMATION section - below for details. + below for details. If is "auto", a base commit is + automatically chosen. --root:: Treat the revision argument as a , even if it @@ -330,8 +331,9 @@ CONFIGURATION ------------- You can specify extra mail header lines to be added to each message, defaults for the subject prefix and file suffix, number patches when -outputting more than one patch, add "To" or "Cc:" headers, configure -attachments, and sign off patches with configuration variables. +outputting more than one patch, add "To:" or "Cc:" headers, configure +attachments, change the patch output directory, and sign off patches +with configuration variables. ------------ [format] @@ -343,7 +345,8 @@ attachments, and sign off patches with configuration variables. cc = attach [ = mime-boundary-string ] signOff = true - coverletter = auto + outputDirectory = + coverLetter = auto ------------ From patchwork Sat Aug 24 08:27:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denton Liu X-Patchwork-Id: 11112953 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0E834912 for ; Sat, 24 Aug 2019 08:27:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DD56921670 for ; Sat, 24 Aug 2019 08:27:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="kCU8Dn/S" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727330AbfHXI1W (ORCPT ); Sat, 24 Aug 2019 04:27:22 -0400 Received: from mail-io1-f67.google.com ([209.85.166.67]:37453 "EHLO mail-io1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726072AbfHXI1V (ORCPT ); Sat, 24 Aug 2019 04:27:21 -0400 Received: by mail-io1-f67.google.com with SMTP id q22so25657667iog.4 for ; Sat, 24 Aug 2019 01:27:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=Fexot9BjtyUt1mPRwfvfi5uGzaCGXiamiNuHKm47t5E=; b=kCU8Dn/S0h7QEYoiv3FXxKcgE1+00gJr2X4VGk6CtTjVUCTJs0m2POoXM3bAzEOiQr +IPTxcGJe5z8QnvWMWkVi7jWhxi0FquPg0v/Pvk1eJOFwfonU8YpG6lrdNaDXrtaRLi7 k4dY7XQ8Rga8I9YxEFZ00mCkLVjlgMpfEZI99R1q5YXV01/DkWJgrRJlMmjQqfEd1pml pneS6o7XbYJstHx6LFh5qnKjBgAfsYBPKKNHSOpRlLgEkhI/0ced+qkYEQdthgspS0Kw yimcdBj1O1Foelgl8ukn4c0Vf0jeIS0IyJrHRFVt7L6+Tc+iJyfzWvddVDqJmBPv4P3I BnLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=Fexot9BjtyUt1mPRwfvfi5uGzaCGXiamiNuHKm47t5E=; b=TWm0rP3CgZhCYWMFiqyfBBBAuYSqkPnpS8MaPDbF0p9MibItksMz9V1f488oCGkd9H vbNZv7MlfOPcU43EeBOlwPlV9X/sdC4npYikj9WRzAKn0Womkljc3jKtOD46UFSK3Wo7 UgeQ9jZCmj4oEmF5ydxXVN5DvrFU0l5Ze62JDPMiVWzR/DbFmAIJXaGD2oduqHBlcVeH q6CRLV18Y8QZeZYtsb3/1a22FUM1zgKczSPfOP9kzThtVeyYGto6UFuapTrP4/2J9BEr fbqD77dsYXy4hgrYO6tcKegHU0M+vqg7h2M3hkXTlp6gDCk6v7iQAPA0GpOUmGGF1ZVX zwfw== X-Gm-Message-State: APjAAAW6nDiPGGWRLRRj0tbT7f/qF87V3dVezqAOhORKD7EK3pNRac6K XrJvwoFIfIrg6Y8XzwLDIB9qOkzE X-Google-Smtp-Source: APXvYqzp2oHmH8srHh+PZmnATe33Wl0UPvTulYpxQf5jSBs0fPjhSCZtQDDB4q+HCZ/oG51+31HJSA== X-Received: by 2002:a02:5105:: with SMTP id s5mr8820110jaa.42.1566635240533; Sat, 24 Aug 2019 01:27:20 -0700 (PDT) Received: from archbookpro.localdomain (CPE18593399858a-CM185933998587.cpe.net.cable.rogers.com. [174.112.89.95]) by smtp.gmail.com with ESMTPSA id f9sm3961148ioc.47.2019.08.24.01.27.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Aug 2019 01:27:20 -0700 (PDT) Date: Sat, 24 Aug 2019 04:27:18 -0400 From: Denton Liu To: Git Mailing List Cc: =?iso-8859-1?q?=C6var_Arnfj=F6r=F0?= Bjarmason , Junio C Hamano , Eric Sunshine , Johannes Sixt , Philip Oakley Subject: [PATCH 13/13] config/format.txt: specify default value of format.coverLetter Message-ID: <7c8522abf2aca59615e68993345c61e255f3a0c2.1566635008.git.liu.denton@gmail.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Signed-off-by: Denton Liu --- Documentation/config/format.txt | 1 + Documentation/git-format-patch.txt | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Documentation/config/format.txt b/Documentation/config/format.txt index 414a5a8a9d..cb629fa769 100644 --- a/Documentation/config/format.txt +++ b/Documentation/config/format.txt @@ -77,6 +77,7 @@ format.coverLetter:: A boolean that controls whether to generate a cover-letter when format-patch is invoked, but in addition can be set to "auto", to generate a cover-letter only when there's more than one patch. + Default is false. format.outputDirectory:: Set a custom directory to store the resulting files instead of the diff --git a/Documentation/git-format-patch.txt b/Documentation/git-format-patch.txt index 95bc4d53ca..0ac56f4b70 100644 --- a/Documentation/git-format-patch.txt +++ b/Documentation/git-format-patch.txt @@ -17,9 +17,9 @@ SYNOPSIS [--signature-file=] [-n | --numbered | -N | --no-numbered] [--start-number ] [--numbered-files] - [--in-reply-to=] [--suffix=.] + [--in-reply-to=] [--suffix=.] [--ignore-if-in-upstream] - [--rfc] [--subject-prefix=] + [--rfc] [--subject-prefix=] [(--reroll-count|-v) ] [--to=] [--cc=] [--[no-]cover-letter] [--quiet] @@ -159,9 +159,9 @@ Beware that the default for 'git send-email' is to thread emails itself. If you want `git format-patch` to take care of threading, you will want to ensure that threading is disabled for `git send-email`. ---in-reply-to=:: +--in-reply-to=:: Make the first mail (or all the mails with `--no-thread`) appear as a - reply to the given Message-Id, which avoids breaking threads to + reply to the given , which avoids breaking threads to provide a new patch series. --ignore-if-in-upstream:: @@ -171,9 +171,9 @@ will want to ensure that threading is disabled for `git send-email`. patches being generated, and any patch that matches is ignored. ---subject-prefix=:: +--subject-prefix=:: Instead of the standard '[PATCH]' prefix in the subject - line, instead use '[]'. This + line, instead use '[]'. This allows for useful naming of a patch series, and can be combined with the `--numbered` option.