git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 8/9 v12] difftool: teach difftool to handle directory diffs

From
Tim Henigan <tim.henigan@gmail.com>
Date
Apr 13, 2012, 16:31 UTC
Message-ID
<CAFouetim-sUQ53dKWF6rVKH9Gx-SVuZmzpJFHosQSSrw+wX71w@mail.gmail.com>
In-Reply-To
<CAJDDKr4UbN3izmqa89CCH7OY4c9LOH0S2EbdUCxHK3G6GHd4xQ@mail.gmail.com>
On Thu, Apr 12, 2012 at 10:53 PM, David Aguilar <davvid@gmail.com> wrote:
Show 10 quoted lines
>
> 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.

Previous: David Aguilar
Message 6 of 6 in “difftool: teach difftool to handle directory diffs”
  1. 8/9 difftool: teach difftool to handle directory diffsTim Henigan, Apr 12, 2012
  2. Junio C HamanoApr 12, 2012
  3. Tim HeniganApr 12, 2012
  4. Junio C HamanoApr 12, 2012
  5. David AguilarApr 13, 2012
  6. Tim HeniganApr 13, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.