Mac OS X bundles a rather nice graphical diff viewer (Filemerge.app) with its developer tools. While git-merge knows how to use this as a merge tool, I couldn't find any way to easily use Filemerge as a viewer for the output of git-diff. (http://thread.gmane.org/gmane.comp.version-control.git/58702 discusses the problem, and recommends piping git-diff into kompare. Filemerge unfortunately won't accept diff output on stdin) So I wrote a quick script (below) which does what I need. Of all the available git-diff flags, it only understands "--cached", and up to two commit objects, and no paths, but that's enough for me. Within those constraints, it has the same semantics as git-diff. It's not very nice, but in case anyone else wants this: #!/bin/sh # # Filemerge.app must not already be open before running # this script, or opendiff below will return immediately, # and the TMPDIRs deleted before it gets the chance to read # them. if test $# = 0; then OLD=`git-write-tree` elif test "$1" = --cached; then OLD=HEAD NEW=`git-write-tree` shift fi if test $# -gt 0; then OLD="$1"; shift fi test $# -gt 0 && test -z "$CACHED" && NEW="$1" TMPDIR1=`mktemp -d` git-archive --format=tar $OLD | (cd $TMPDIR1; tar xf -) if test -z "$NEW"; then TMPDIR2=$(git rev-parse --show-cdup) test -z "$cdup" && TMPDIR2=. else TMPDIR2=`mktemp -d` git-archive --format=tar $NEW | (cd $TMPDIR2; tar xf -) fi opendiff $TMPDIR1 $TMPDIR2 | cat rm -rf $TMPDIR1 test ! -z "$NEW" && rm -rf $TMPDIR2 -- Dr. Toby O. H. White Dept. Earth Sciences, Downing Street, Cambridge CB2 3EQ United Kingdom Tel: +44 1223 333464 Fax: +44 1223 333450 Web: http://uszla.me.uk - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| Matt Mackall | Re: + fix-spellings-of-slab-allocator-section-in-init-kconfig.patch added to -mm t... |
| Andi Kleen | [PATCH] [0/36] Great change_page_attr patch series v3 |
| Bron Gondwana | Re: BUG: mmapfile/writev spurious zero bytes (x86_64/not i386, bisected, reproduca... |
| Nigel Kukard | SATA problems |
| Karl R. Buck | Re: (none) |
| drew | Re: Use PERL rather than C for system commands? |
| Theodore Ts'o | Re: demand paging: proposal |
| Steffen Finger | make compatible to bsd-make ? |
| Adrian Bunk | [2.6 patch] unexport icmpmsg_statistics |
| Evgeniy Polyakov | Re: [2/3] POHMELFS: Documentation. |
| jamal | Re: [PATCH 2/3][NET_BATCH] net core use batching |
| Stephane Chazelas | [iproute2] get_hz() with CONFIG_HIGH_RES_TIMERS |
git: | |
| Elijah Newren | Trying to use git-filter-branch to compress history by removing large, obsolete bi... |
| Junio C Hamano | PPC SHA-1 Updates in "pu" |
| Jon Smirl | Re: [PATCH 1/2] t7001: add test for git-mv dir1 dir2/ |
| Junio C Hamano | Re: Octopus merge: unique (?) to git, but is it useful? |
| Problem in scim in Fedora 9 | 34 minutes ago | Linux general |
| Firewall | 13 hours ago | OpenBSD |
| windows folder creation surprise | 17 hours ago | Windows |
| IP layer send packet | 1 day ago | Linux kernel |
| dtrace for linux available | 1 day ago | Linux kernel |
| Unable to mount ramdisk image using UBoot while upgrading to 2.6.15 kernel for a MPC8540 based target | 1 day ago | Linux kernel |
| RealTek RTL8169 - can't connect | 2 days ago | NetBSD |
| vsftpd Upload Problems | 2 days ago | Linux general |
| creating con folder in desktop | 2 days ago | Windows |
| Question about PFRA, dirty page cache, and tmpfs/swap | 2 days ago | Linux kernel |
