From: Tim Henigan <tim.henigan@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: davvid@gmail.com, git@vger.kernel.org
Subject: Re: [PATCH 7/9] difftool: teach difftool to handle directory diffs
Date: Tue, 20 Mar 2012 16:17:51 -0400 [thread overview]
Message-ID: <CAFouethvGQD3RR_Lcu6GFA3pRS7_7nQC77g7coxOBDBP4ATP6A@mail.gmail.com> (raw)
In-Reply-To: <7vlimv5del.fsf@alter.siamese.dyndns.org>
On Tue, Mar 20, 2012 at 2:35 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Tim Henigan <tim.henigan@gmail.com> writes:
>
>> However, when 'difftool --dir-diff' is run from a subdirectory of the
>> Git repository, there are problems.
>> - The temporary index file generated by 'git update-index' appears
>> to be correct.
>> - 'git checkout-index --all --prefix=$tmp' command does not work
>> (output tmp dir is empty).
>
> Hrmph.
>
> $ rm -fr /tmp/xyz
> $ cd Documentation
> $ git checkout-index --all --prefix=/tmp/xyz/
> $ ls -F /tmp/xyz
> Documentation/
> $ rm -fr /tmp/xyz
> $ GIT_DIR=$(pwd)/../.git GIT_WORK_TREE=$(pwd) \
> git checkout-index --all --prefix=/tmp/xyz/
> $ ls -FC /tmp/xyz | head -2
> abspath.c git-merge-octopus.sh* reflog-walk.c
> aclocal.m4 git-merge-one-file.sh* reflog-walk.h
>
> Be sure to have the trailing slash in $tmp.
It turns out that 'Git::command_oneline()' does not honor environment
variables set prior to calling the function.
This change fixed the problem:
- $repo->command_oneline(["checkout-index", "-a", "--prefix=$ldir/"]);
+ $ENV{GIT_DIR} = $repo->repo_path();
+ system(('git', 'checkout-index', '-a', "--prefix=$ldir/"));
I'm still testing, but will submit an updated patch soon.
prev parent reply other threads:[~2012-03-20 20:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-17 1:59 [PATCH 7/9] difftool: teach difftool to handle directory diffs Tim Henigan
2012-03-17 3:08 ` David Aguilar
2012-03-17 14:18 ` Tim Henigan
2012-03-17 14:32 ` Jakub Narebski
2012-03-18 0:58 ` Tim Henigan
2012-03-20 17:43 ` Tim Henigan
2012-03-20 18:35 ` Junio C Hamano
2012-03-20 20:17 ` Tim Henigan [this message]
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=CAFouethvGQD3RR_Lcu6GFA3pRS7_7nQC77g7coxOBDBP4ATP6A@mail.gmail.com \
--to=tim.henigan@gmail.com \
--cc=davvid@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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.
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).