Re: [PATCH] difftool: support repositories with .git-files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jens Lehmann <Jens.Lehmann@xxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]