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

Re: [PATCH 3/3] difftool: use Git::* functions instead of passing around state

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 19, 2016, 18:29 UTC
Message-ID
<xmqqtwflfpn6.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20160719035756.24961-3-davvid@gmail.com>
David Aguilar <davvid@gmail.com> writes:
> Call Git::command() and friends directly wherever possible.
> This makes it clear that these operations can be invoked directly
> without needing to manage the current directory and related GIT_*
> environment variables.
Good.
Show 13 quoted lines
> @@ -88,11 +80,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) {

This hunk looks like "oops, the @diffargs variable logically belongs here, not there", correcting an mistake in an earlier step.

Previous: David AguilarNext: Junio C Hamano
Message 7 of 8 in “difftool: fix argument handling in subdirs”
  1. 1/3 difftool: fix argument handling in subdirsDavid Aguilar, Jul 19, 2016
  2. 2/3 difftool: avoid $GIT_DIR and $GIT_WORK_TREEDavid Aguilar, Jul 19, 2016
  3. Junio C HamanoJul 19, 2016
  4. Junio C HamanoJul 19, 2016
  5. David AguilarJul 20, 2016
  6. 3/3 difftool: use Git::* functions instead of passing around stateDavid Aguilar, Jul 19, 2016
  7. Junio C HamanoJul 19, 2016
  8. Junio C HamanoJul 19, 2016

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.