Re: git diffall, open all diff files immediatly (eg tabbed window in BC)
- From
David Aguilar <davvid@gmail.com>
- Date
- Aug 21, 2009, 05:40 UTC
- Message-ID
- <20090821054044.GB32879@gmail.com>
- In-Reply-To
- <loom.20090821T053954-649@post.gmane.org>
Hi,
On Fri, Aug 21, 2009 at 03:47:07AM +0000, Seba Illingworth wrote:
Show 8 quoted lines
> 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