git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: David Aguilar <davvid@gmail.com>
Cc: John Keeping <john@keeping.me.uk>,
	Bernhard Kirchen <bernhard.kirchen@rwth-aachen.de>,
	Tim Henigan <tim.henigan@gmail.com>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH 2/3] difftool: avoid $GIT_DIR and $GIT_WORK_TREE
Date: Tue, 19 Jul 2016 14:06:35 -0700	[thread overview]
Message-ID: <xmqqvb01e3s4.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <xmqqy44xfq3n.fsf@gitster.mtv.corp.google.com> (Junio C. Hamano's message of "Tue, 19 Jul 2016 11:19:08 -0700")

Junio C Hamano <gitster@pobox.com> writes:

> It is not wrong per-se, but as you are in a subshell, you do not
> have to unset these, I would think.  Not worth a reroll, but unless
> I am overlooking something (in which case please holler) I'm
> inclined to remove these two lines myself while queuing the series.

I propose to squashing the following to 2/3 (and adjusting 3/3 as
needed).  No need to resend if you agree it is a good idea, as it is
part of what I've queued on 'pu'.

Thanks.

 git-difftool.perl   | 2 +-
 t/t7800-difftool.sh | 2 --
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/git-difftool.perl b/git-difftool.perl
index bc2267f..c81cbe4 100755
--- a/git-difftool.perl
+++ b/git-difftool.perl
@@ -88,11 +88,11 @@ sub changed_files
 	my @refreshargs = (
 		@gitargs, 'update-index',
 		'--really-refresh', '-q', '--unmerged');
-	my @diffargs = (@gitargs, 'diff-files', '--name-only', '-z');
 	try {
 		Git::command_oneline(@refreshargs);
 	} catch Git::Error::Command with {};
 
+	my @diffargs = (@gitargs, 'diff-files', '--name-only', '-z');
 	my $line = Git::command_oneline(@diffargs);
 	my @files;
 	if (defined $line) {
diff --git a/t/t7800-difftool.sh b/t/t7800-difftool.sh
index afdf370..cb25480 100755
--- a/t/t7800-difftool.sh
+++ b/t/t7800-difftool.sh
@@ -421,8 +421,6 @@ run_dir_diff_test 'difftool --dir-diff from subdirectory with GIT_DIR set' '
 		cd sub &&
 		git difftool --dir-diff $symlinks --extcmd ls \
 			branch -- sub >output &&
-		sane_unset GIT_WORK_TREE &&
-		sane_unset GIT_DIR &&
 		grep sub output &&
 		! grep file output
 	)
-- 
2.9.2-581-g77f0ffb


  reply	other threads:[~2016-07-19 21:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-19  3:57 [PATCH 1/3] difftool: fix argument handling in subdirs David Aguilar
2016-07-19  3:57 ` [PATCH 2/3] difftool: avoid $GIT_DIR and $GIT_WORK_TREE David Aguilar
2016-07-19 18:19   ` Junio C Hamano
2016-07-19 21:06     ` Junio C Hamano [this message]
2016-07-20 22:25       ` David Aguilar
2016-07-19  3:57 ` [PATCH 3/3] difftool: use Git::* functions instead of passing around state David Aguilar
2016-07-19 18:29   ` Junio C Hamano
2016-07-19 18:15 ` [PATCH 1/3] difftool: fix argument handling in subdirs 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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=xmqqvb01e3s4.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=bernhard.kirchen@rwth-aachen.de \
    --cc=davvid@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=john@keeping.me.uk \
    --cc=tim.henigan@gmail.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).