{"thread":{"id":"20679","subject":"git diffall, open all diff files immediatly (eg tabbed window in BC)","startedAt":"2009-08-21T03:47:07Z","lastAt":"2009-08-22T02:10:15Z","messageCount":5,"participants":["Seba Illingworth","David Aguilar"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"121376","messageId":"loom.20090821T053954-649@post.gmane.org","threadId":"20679","inReplyTo":null,"subject":"git diffall, open all diff files immediatly (eg tabbed window in BC)","fromName":"Seba Illingworth","fromEmail":"seba.illingworth@gmail.com","sentAt":"2009-08-21T03:47:07Z","receivedAt":"2009-08-21T03:47:07Z","isPatch":false,"sender":{"key":"seba.illingworth@gmail.com","avatar":"https://gravatar.com/avatar/b60029c0c653904e427c724df5c87503e32aa187fcf20658089f1ed78b144996?d=mp&s=160"},"body":"I came up with the following 'git-diffall' script to open all diff files\nimmediately, rather than default behavior of opening them one at a \ntime in serial.\n\n    for name in $(git diff --name-only $1); do git difftool $1 $name & done\n\nI blogged the details at \nhttp://blog.codefarm.co.nz/2009/08/git-diff-and-difftool-open-all-files.html\n"},{"id":"121383","messageId":"20090821054044.GB32879@gmail.com","threadId":"20679","inReplyTo":"loom.20090821T053954-649@post.gmane.org","subject":"Re: git diffall, open all diff files immediatly (eg tabbed window in BC)","fromName":"David Aguilar","fromEmail":"davvid@gmail.com","sentAt":"2009-08-21T05:40:45Z","receivedAt":"2009-08-21T05:40:45Z","isPatch":false,"sender":{"key":"davvid@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13196?v=4"},"body":"Hi,\n\nOn Fri, Aug 21, 2009 at 03:47:07AM +0000, Seba Illingworth wrote:\n> I came up with the following 'git-diffall' script to open all diff files\n> immediately, rather than default behavior of opening them one at a \n> time in serial.\n> \n>     for name in $(git diff --name-only $1); do git difftool $1 $name & done\n> \n> I blogged the details at \n> http://blog.codefarm.co.nz/2009/08/git-diff-and-difftool-open-all-files.html\n\nYou must have difftool.prompt (or mergetool.prompt) set to\nfalse, otherwise git would be prompting you during the loop.\n\nTo make it work irrespective of the configuration, pass\n--no-prompt or -y to difftool.\n\n\nAlso maybe something like:\n\nfor name in \"$(git diff --name-only \"$@\")\"; do\n\tgit difftool \"$@\" \"$name\" &\ndone\n\nThe quotes should make it work paths that have spaces.\nThe \"$@\" should let you pass arbitrary parameters to difftool.\n\nHave fun,\n\n-- \n\t\tDavid\n"},{"id":"121384","messageId":"loom.20090821T074953-77@post.gmane.org","threadId":"20679","inReplyTo":"20090821054044.GB32879@gmail.com","subject":"Re: git diffall, open all diff files immediatly (eg tabbed window in BC)","fromName":"Seba Illingworth","fromEmail":"seba.illingworth@gmail.com","sentAt":"2009-08-21T05:54:48Z","receivedAt":"2009-08-21T05:54:48Z","isPatch":false,"sender":{"key":"seba.illingworth@gmail.com","avatar":"https://gravatar.com/avatar/b60029c0c653904e427c724df5c87503e32aa187fcf20658089f1ed78b144996?d=mp&s=160"},"body":"David Aguilar <davvid <at> gmail.com> writes:\n> To make it work irrespective of the configuration...\n\nHi David, great to get your comments, thanks for the pointers!\n"},{"id":"121479","messageId":"20090821234512.GA58248@gmail.com","threadId":"20679","inReplyTo":"loom.20090821T074953-77@post.gmane.org","subject":"Re: git diffall, open all diff files immediatly (eg tabbed window?in BC)","fromName":"David Aguilar","fromEmail":"davvid@gmail.com","sentAt":"2009-08-21T23:45:13Z","receivedAt":"2009-08-21T23:45:13Z","isPatch":false,"sender":{"key":"davvid@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13196?v=4"},"body":"On Fri, Aug 21, 2009 at 05:54:48AM +0000, Seba Illingworth wrote:\n> David Aguilar <davvid <at> gmail.com> writes:\n> > To make it work irrespective of the configuration...\n> \n> Hi David, great to get your comments, thanks for the pointers!\n\nOne last note (I promise ;)):\n\nI would recommend against saying 'git difftool head' on your\nblog beause that only works on OSX with its case-preserving yet\ncase-insensitive filesystem.  It might be worth mentioning that.\n\nIf you try 'git diff head' on a different filesystem (for\nexample, if you tried it on Linux) you'll find that it doesn't\nwork because the file is .git/HEAD; .git/head doesn't exist.\n\nOn OSX the filesystem tells git that .git/head exists even\nthough it's actually finding .git/HEAD.\n\n-- \n\t\tDavid\n"},{"id":"121484","messageId":"loom.20090822T035703-224@post.gmane.org","threadId":"20679","inReplyTo":"20090821234512.GA58248@gmail.com","subject":"Re: git diffall, open all diff files immediatly (eg tabbed window?in BC)","fromName":"Seba Illingworth","fromEmail":"seba.illingworth@gmail.com","sentAt":"2009-08-22T02:10:15Z","receivedAt":"2009-08-22T02:10:15Z","isPatch":false,"sender":{"key":"seba.illingworth@gmail.com","avatar":"https://gravatar.com/avatar/b60029c0c653904e427c724df5c87503e32aa187fcf20658089f1ed78b144996?d=mp&s=160"},"body":"David Aguilar <davvid <at> gmail.com> writes:\n> I would recommend against saying 'git difftool head' on your\n> blog beause that only works on OSX with its case-preserving yet\n> case-insensitive filesystem....\n\nThanks David, understood and updated to 'HEAD'. 'head' had worked for me with my \nsloppy Windows ways ;)\n\nI struggled with your previous suggestion for handling paths with spaces; \nI couldn't get the for-loop to split the input into individual filenames\non the line-break separator (after outer quotes expanded the result?).\n\nBut rewriting it this way seems to work well and handles spaces (Windows):\n\n    git diff --name-only \"$@\" | while read filename; do\n        git difftool \"$@\" --no-prompt \"$filename\" &\n    done\n\nHope you can comment on this variation? \nAnd thanks for all the tips! Seba\n"}]}