git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* difftool / mergetool waiting
@ 2012-01-14  5:13 Jonathan Seng
  2012-01-14  8:38 ` Andreas Schwab
  0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Seng @ 2012-01-14  5:13 UTC (permalink / raw)
  To: git

Hello,

I would like an option to difftool and mergetool that would control
waiting for a return code from the difftool: wait.


Like prompt, wait would be configurable with the difftool.name.

Like prompt and for backwards compatibility, wait would default true.


If wait is false, prompt would be overridden to be false.

If wait is false, git would fire off the tool command and proceed to
the next then exit cleanly.

If wait is true, git would behave as now: it will wait for an exit
code of each tool execution before proceeding.


Thank you,

Jonathan

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: difftool / mergetool waiting
  2012-01-14  5:13 difftool / mergetool waiting Jonathan Seng
@ 2012-01-14  8:38 ` Andreas Schwab
  2012-01-20  7:25   ` David Aguilar
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Schwab @ 2012-01-14  8:38 UTC (permalink / raw)
  To: Jonathan Seng; +Cc: git

Jonathan Seng <nekenyu@gmail.com> writes:

> If wait is false, git would fire off the tool command and proceed to
> the next then exit cleanly.

That doesn't work for git mergetool, it wouldn't be able to postprocess
the result of calling the tool command.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: difftool / mergetool waiting
  2012-01-14  8:38 ` Andreas Schwab
@ 2012-01-20  7:25   ` David Aguilar
  0 siblings, 0 replies; 3+ messages in thread
From: David Aguilar @ 2012-01-20  7:25 UTC (permalink / raw)
  To: Jonathan Seng; +Cc: Andreas Schwab, git

On Sat, Jan 14, 2012 at 12:38 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
> Jonathan Seng <nekenyu@gmail.com> writes:
>
>> If wait is false, git would fire off the tool command and proceed to
>> the next then exit cleanly.
>
> That doesn't work for git mergetool, it wouldn't be able to postprocess
> the result of calling the tool command.

The difficulty on the difftool side is that the git-difftool--helper
scriptlet is being driven by git diff (as a $GIT_EXTERNAL_DIFF) and
depends on git diff to do the temp file cleanup.  Not blocking would
return control immediately to git diff.  This is unwanted because the
temp files would likely be removed before the tools have a chance to
open them.

You could write a script that simply forks off multiple difftool
commands.  The difftool stuff in git-cola does exactly that, for
example.
-- 
            David

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-01-20  7:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-14  5:13 difftool / mergetool waiting Jonathan Seng
2012-01-14  8:38 ` Andreas Schwab
2012-01-20  7:25   ` David Aguilar

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).