Created
April 1, 2009 06:59
Revisions
-
atnan revised this gist
Apr 1, 2009 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,8 +5,8 @@ # # http://kerneltrap.org/mailarchive/git/2007/11/21/435536 # # Superficial changes were made by Nathan de Vries to allow the script to be # run under Leopard. Tony's original instructions follow: # # 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 -
atnan created this gist
Apr 1, 2009 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,39 @@ #!/bin/sh # # This script was written by Toby White under an unknown license, and published # on the Git mailing list: # # http://kerneltrap.org/mailarchive/git/2007/11/21/435536 # # Superficial changes have been made to allow the script to be run on Leopard. # His instructions follow: # # 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 /tmp/opendiff.XXXX` 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