Use the program listed in the git config variable diff.tool to present the
differences, else fall back to diff.
#!/bin/sh
+# Thanks to Thomas Rast
+# http://thread.gmane.org/gmane.comp.version-control.git/124807
+SUBDIRECTORY_OK=1
. "$(git --exec-path)/git-sh-setup"
cd_to_toplevel # for the tar below
cd "$tmp"
#meld a b
#diff -ur a b
-kdiff3 a b
+tool="$(git-config diff.tool)"
+if [ -n "$tool" ]; then
+ "$tool" a b
+else
+ diff -urN a b
+fi
.PP
\fBgit-diffall\fR performs a visual diff using kdiff3 between PRE and POST
of the current project. No arguments will show the differences between the
-working directory and HEAD. Later this tool can be improved upon to use the
-tool listed in the config file (difftool), or if none present fall back to
-a 'normal' git diff.
+working directory and HEAD. If in the git config diff.tool is set, this
+program is passed the name of the two temporary directories containing the
+changed files of each revision. If diff.tool is not defined, the fall-back
+is to diff.
Thanks to Thomas Rast for publishing this script online:
http://thread.gmane.org/gmane.comp.version-control.git/124807