Subject: Re: git diffall, open all diff files immediatly (eg tabbed window in BC)

From: David Aguilar <[email-masked]>
Date: Thu, 20 Aug 2009 22:40:45 -0700

Hi,

On Fri, Aug 21, 2009 at 03:47:07AM +0000, Seba Illingworth wrote:
> I came up with the following 'git-diffall' script to open all diff files
> immediately, rather than default behavior of opening them one at a 
> time in serial.
> 
>     for name in $(git diff --name-only $1); do git difftool $1 $name & done
> 
> I blogged the details at 
> http://blog.codefarm.co.nz/2009/08/git-diff-and-difftool-open-all-files.html

You must have difftool.prompt (or mergetool.prompt) set to
false, otherwise git would be prompting you during the loop.

To make it work irrespective of the configuration, pass
--no-prompt or -y to difftool.

Also maybe something like:

for name in "$(git diff --name-only "$@")"; do
	git difftool "$@" "$name" &
done

The quotes should make it work paths that have spaces.
The "$@" should let you pass arbitrary parameters to difftool.

Have fun,

-- 
		David