git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Abhishek Kumar <abhishekkumar8222@gmail.com>
Cc: git@vger.kernel.org, Johannes Schindelin <johannes.schindelin@gmx.de>
Subject: Re: [GSoC Patch 1/5] lib-log-graph.sh: consolidate test_cmp_graph logic
Date: Wed, 19 Feb 2020 09:32:50 -0800	[thread overview]
Message-ID: <xmqqh7zmfpod.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <xmqqk14mm61r.fsf@gitster-ct.c.googlers.com> (Junio C. Hamano's message of "Sun, 16 Feb 2020 16:05:52 -0800")

Here is what I said in the message I am responding to in the patch
form.

 t/lib-log-graph.sh | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/t/lib-log-graph.sh b/t/lib-log-graph.sh
index 999f2600de..bc70f01e84 100644
--- a/t/lib-log-graph.sh
+++ b/t/lib-log-graph.sh
@@ -1,6 +1,12 @@
 # Helpers shared by the test scripts for comparing log graphs.
 
-sanitize_output() {
+sanitize_output () {
+	# Versions of Git that predate 7f814632 ("Use correct grammar
+	# in diffstat summary line", 2012-02-01) did not correctly use
+	# singular when one path was involved, and a handful of rules
+	# were added to work with both older and newer versions of Git
+	# back then.  These are probably not relevant anymore, and
+	# we'd want to lose them someday...
 	sed -e 's/ *$//' \
 	    -e 's/commit [0-9a-f]*$/commit COMMIT_OBJECT_NAME/' \
 	    -e 's/Merge: [ 0-9a-f]*$/Merge: MERGE_PARENTS/' \
@@ -15,25 +21,25 @@ sanitize_output() {
 }
 
 # Assume expected graph is in file `expect`
-test_cmp_graph_file() {
+test_cmp_graph_file () {
 	git log --graph "$@" >output &&
-	sanitize_output >output.trimmed <output &&
-	test_i18ncmp expect output.trimmed
+	sanitize_output >output.sanitized <output &&
+	test_i18ncmp expect output.sanitized
 }
 
-test_cmp_graph() {
+test_cmp_graph () {
 	cat >expect &&
 	test_cmp_graph_file "$@"
 }
 
 # Assume expected graph is in file `expect.colors`
-test_cmp_colored_graph_file() {
+test_cmp_colored_graph_file () {
 	git log --graph --color=always "$@" >output.colors.raw &&
 	test_decode_color <output.colors.raw | sed "s/ *\$//" >output.colors &&
 	test_cmp expect.colors output.colors
 }
 
-test_cmp_colored_graph() {
+test_cmp_colored_graph () {
 	cat >expect.colors &&
 	test_cmp_colored_graph_file "$@"
 }
-- 
2.25.1-440-g39558b81cc


  reply	other threads:[~2020-02-19 17:32 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-16 13:47 [GSoC Patch 1/5] lib-log-graph.sh: consolidate test_cmp_graph logic Abhishek Kumar
2020-02-16 13:47 ` [GSoC Patch 2/5] t3430: use lib-log-graph functions Abhishek Kumar
2020-02-19 17:23   ` Junio C Hamano
2020-02-16 13:47 ` [GSoC Patch 3/5] t4215: " Abhishek Kumar
2020-02-19 17:26   ` Junio C Hamano
2020-02-16 13:47 ` [GSoC Patch 4/5] t4214: " Abhishek Kumar
2020-02-19 17:29   ` Junio C Hamano
2020-02-16 13:47 ` [GSoC Patch 5/5] t4202: " Abhishek Kumar
2020-02-19 17:31   ` Junio C Hamano
2020-02-17  0:05 ` [GSoC Patch 1/5] lib-log-graph.sh: consolidate test_cmp_graph logic Junio C Hamano
2020-02-19 17:32   ` Junio C Hamano [this message]
2020-02-20  9:15 ` [GSoC PATCH v2 0/2] Consolidate " Abhishek Kumar
2020-02-20  9:15   ` [GSoC PATCH v2 1/2] lib-log-graph: consolidate " Abhishek Kumar
2020-02-20 17:49     ` Junio C Hamano
2020-02-20  9:15   ` [PATCH v2 2/2] lib-log-graph: consolidate colored graph cmp logic Abhishek Kumar
2020-02-24 13:38 ` [GSoC Patch v3 1/2] lib-log-graph: consolidate test_cmp_graph logic Abhishek Kumar
2020-02-24 13:38   ` [GSoC Patch v3 2/2] lib-log-graph: consolidate colored graph cmp logic Abhishek Kumar
2020-02-24 21:17   ` [GSoC Patch v3 1/2] lib-log-graph: consolidate test_cmp_graph logic Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqh7zmfpod.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=abhishekkumar8222@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=johannes.schindelin@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).