Re: [PATCH] Wait for git diff to finish in git difftool

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On  0, Alex Riesen <raa.lkml@xxxxxxxxx> wrote:
> In ActivetState Perl, exec does not wait for the started program. This
> breaks difftool tests and may cause unexpected behaviour: git difftool
> has returned, but the rest of code (diff and possibly the interactive
> program are still running in the background.

Thanks for keeping an eye on portability.

There's a tiny typo in the commit message (Active't'State) that
maybe you can tweak before applying?  ('you' being Junio)

For whatever it's worth,

Acked-by: David Aguilar <davvid@xxxxxxxxx>


> I usually don't care for exit code in a pure UI tool, so the kill signal
> is just ORed together with the real exit code just to provide indication
> of error.

This seems reasonable.  The exit code isn't very important in
the common 'show-me-the-diff' read-only scenario, and I wouldn't
expect anyone to rely on difftool being exactly exit-code
equivalent to git-diff.


> diff --git a/git-difftool.perl b/git-difftool.perl
> index 948ff7f..bd828c2 100755
> --- a/git-difftool.perl
> +++ b/git-difftool.perl
> @@ -82,4 +82,5 @@ sub generate_command
>  }
> 
>  setup_environment();
> -exec(generate_command());
> +my $rc = system(generate_command());
> +exit($rc | ($rc >> 8));
> -- 
> 1.6.3.rc0.45.g63634

-- 
		David
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]