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

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
Previous: Seba IllingworthNext: Seba Illingworth
Message 2 of 5 in “git diffall, open all diff files immediatly (eg tabbed window in BC)”
  1. Seba IllingworthAug 21, 2009
  2. David AguilarAug 21, 2009
  3. Seba IllingworthAug 21, 2009
  4. David AguilarAug 21, 2009
  5. Seba IllingworthAug 22, 2009

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.