public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: Jens Lehmann <Jens.Lehmann@web•de>
Cc: "David Aguilar" <davvid@gmail•com>,
	git@vger•kernel.org, "Gábor Lipták" <gabor.liptak@gmail•com>,
	"John Keeping" <john@keeping•me.uk>
Subject: Re: [PATCH] difftool: support repositories with .git-files
Date: Tue, 25 Feb 2014 14:12:11 -0800	[thread overview]
Message-ID: <xmqqd2ia6dvo.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <530CFE56.6040807@web.de> (Jens Lehmann's message of "Tue, 25 Feb 2014 20:34:30 +0000")

Jens Lehmann <Jens.Lehmann@web•de> writes:

>>> +test_expect_success PERL 'difftool properly honours gitlink and core.worktree' '
>>> +	git submodule add ./. submod/ule &&
>>> +	(
>>> +		cd submod/ule &&
>>> +		git difftool --tool=echo  --dir-diff --cached
>> 
>> In the context of this fix, finishing with 0 exit status may be all
>> we care about, but do we also care about things like in what
>> directory the tool is invoked in, what arguments and extra
>> environment settings (if any) it is given, and stuff like that?
>
> Sure. But I just intended to test the fix (and the test can easily
> be extended by people who know more about difftool than I do).

Yes, we need to start somewhere and I'd agree that it was a good
starting point.

> Right, using echo was not the best choice here. I used it to avoid
> the dependency to meld...

Perhaps like this then?  This is an "a monkey sees what
difftool_test_setup does and then mimics" patch ;-).

 t/t7800-difftool.sh | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/t/t7800-difftool.sh b/t/t7800-difftool.sh
index 2418528..595f808 100755
--- a/t/t7800-difftool.sh
+++ b/t/t7800-difftool.sh
@@ -434,4 +434,17 @@ test_expect_success PERL 'difftool --no-symlinks detects conflict ' '
 	)
 '
 
+test_expect_success PERL 'difftool properly honours gitlink and core.worktree' '
+	git submodule add ./. submod/ule &&
+	(
+		cd submod/ule &&
+		git config diff.tool checktrees &&
+		git config difftool.checktrees.cmd '\''
+			test -d "$LOCAL" && test -d "$REMOTE"
+		'\'' &&
+		echo further >>file &&
+		git difftool --tool=checktrees --dir-diff
+	)
+'
+
 test_done

  reply	other threads:[~2014-02-25 22:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-24  3:12 [PATCH] difftool: support repositories with .git-files David Aguilar
2014-02-24 17:55 ` Junio C Hamano
2014-02-24 21:10   ` Jens Lehmann
2014-02-25 18:02     ` Junio C Hamano
2014-02-25 20:34       ` Jens Lehmann
2014-02-25 22:12         ` Junio C Hamano [this message]
2014-02-27 21:12           ` Jens Lehmann
2014-03-05  9:23             ` [PATCH] t7800: add a difftool test for .git-files David Aguilar

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=xmqqd2ia6dvo.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox$(echo .)com \
    --cc=Jens.Lehmann@web$(echo .)de \
    --cc=davvid@gmail$(echo .)com \
    --cc=gabor.liptak@gmail$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=john@keeping$(echo .)me.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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