All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tim Henigan <tim.henigan@gmail.com>
To: David Aguilar <davvid@gmail.com>
Cc: git@vger.kernel.org, ramsay@ramsay1.demon.co.uk,
	Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH 8/9 v12] difftool: teach difftool to handle directory diffs
Date: Fri, 13 Apr 2012 12:31:21 -0400	[thread overview]
Message-ID: <CAFouetim-sUQ53dKWF6rVKH9Gx-SVuZmzpJFHosQSSrw+wX71w@mail.gmail.com> (raw)
In-Reply-To: <CAJDDKr4UbN3izmqa89CCH7OY4c9LOH0S2EbdUCxHK3G6GHd4xQ@mail.gmail.com>

On Thu, Apr 12, 2012 at 10:53 PM, David Aguilar <davvid@gmail.com> wrote:
>
> The issue is that this does not properly handle shell characters, IFS, etc.
>
> I think a simple solution would be to use git diff --exit-code --quiet here.
>
> e.g.
>
>    my $rc = system('git', 'diff', '--exit-code', '--quiet', @ARGV);
>
> That avoids the shell and properly handles shell meta-characters, IFS, etc.

The problem is that I need the output of 'git diff' to drive the rest
of the script.  Getting STDOUT from a system() call is difficult, so I
switched to backticks.  Obviously I missed the regression.

The best solution seems to be to find a way to make
'Git->repository->command*' to work with $GIT_DIR and $GIT_WORK_TREE.
I will send v13 with this change soon.

      reply	other threads:[~2012-04-13 16:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-12 13:18 Tim Henigan
2012-04-12 18:27 ` Junio C Hamano
2012-04-12 19:10   ` Tim Henigan
2012-04-12 19:31     ` Junio C Hamano
2012-04-13  2:53       ` David Aguilar
2012-04-13 16:31         ` 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=CAFouetim-sUQ53dKWF6rVKH9Gx-SVuZmzpJFHosQSSrw+wX71w@mail.gmail.com \
    --to=tim.henigan@gmail.com \
    --cc=davvid@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=ramsay@ramsay1.demon.co.uk \
    --subject='Re: [PATCH 8/9 v12] difftool: teach difftool to handle directory diffs' \
    /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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.