From: Jeff King <peff@peff.net>
To: Ramkumar Ramachandra <artagnon@gmail.com>
Cc: Git List <git@vger.kernel.org>
Subject: Re: [PATCH v4 0/4] Introduce diff.submodule
Date: Thu, 15 Nov 2012 08:33:57 -0800 [thread overview]
Message-ID: <20121115163356.GF6157@sigill.intra.peff.net> (raw)
In-Reply-To: <20121115162524.GE6157@sigill.intra.peff.net>
On Thu, Nov 15, 2012 at 08:25:26AM -0800, Jeff King wrote:
> > Thanks, this version looks good to me.
>
> Oh wait. I did not look closely enough. The point was to move the option
> parser _out_ of git_diff_ui_config into git_diff_basic_config, so that
> it only triggers for porcelain, not plumbing.
Oh no, I am having a muddled morning. It _is_ right. We want to move it
out of basic into ui. Sorry for the noise. I just woke up and am
thinking backwards.
It may be worth squashing this test into patch 3:
diff --git a/t/t4041-diff-submodule-option.sh b/t/t4041-diff-submodule-option.sh
index e401814..023439f 100755
--- a/t/t4041-diff-submodule-option.sh
+++ b/t/t4041-diff-submodule-option.sh
@@ -72,6 +72,21 @@ EOF
test_cmp expected actual
"
+test_expect_success 'diff.submodule does not affect plumbing' '
+ test_config diff.submodule log &&
+ git diff-index -p HEAD >actual &&
+ cat >expected <<-EOF &&
+ diff --git a/sm1 b/sm1
+ new file mode 160000
+ index 0000000..a2c4dab
+ --- /dev/null
+ +++ b/sm1
+ @@ -0,0 +1 @@
+ +Subproject commit $fullhead1
+ EOF
+ test_cmp expected actual
+'
+
commit_file sm1 &&
head2=$(add_file sm1 foo3)
BTW, while writing the test, I noticed two minor nits with your tests:
1. They can use test_config, which is simpler (you do not need to
unset yourself after the test) and safer (the unset happens via
test_when_finished, so it works even if the test fails).
2. You can still indent expected output when using <<-.
I don't know if it is worth re-rolling for them.
-Peff
next prev parent reply other threads:[~2012-11-15 16:34 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <http://mid.gmane.org/1352653146-3932-1-git-send-email-artagnon@gmail.com>
2012-11-13 15:42 ` [PATCH v4 0/4] Introduce diff.submodule Ramkumar Ramachandra
2012-11-13 15:42 ` [PATCH v4 1/4] Documentation: move diff.wordRegex from config.txt to diff-config.txt Ramkumar Ramachandra
2012-11-13 15:42 ` [PATCH v4 2/4] diff: introduce diff.submodule configuration variable Ramkumar Ramachandra
2012-11-20 0:48 ` Junio C Hamano
2012-11-22 9:40 ` Ramkumar Ramachandra
2012-11-22 9:44 ` Ramkumar Ramachandra
2012-11-13 15:42 ` [PATCH v4 3/4] diff: rename "set" variable Ramkumar Ramachandra
2012-11-13 15:42 ` [PATCH v4 4/4] submodule: display summary header in bold Ramkumar Ramachandra
2012-11-15 16:23 ` [PATCH v4 0/4] Introduce diff.submodule Jeff King
2012-11-15 16:25 ` Jeff King
2012-11-15 16:33 ` Jeff King [this message]
2012-11-16 10:45 ` Ramkumar Ramachandra
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=20121115163356.GF6157@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=artagnon@gmail.com \
--cc=git@vger.kernel.org \
/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).