summaryrefslogtreecommitdiff
path: root/git-difftool--helper.sh
diff options
context:
space:
mode:
authorTim Henigan <tim.henigan@gmail.com>2012-04-23 18:23:41 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-04-23 18:59:34 (GMT)
commit7e0abcec103b3649943b236881cf88e8fd6cf3a4 (patch)
tree99936329de9603b8284f7d0eda6d2b09c5723193 /git-difftool--helper.sh
parente9653615fafcbac6109da99fac4fa66b0b432048 (diff)
downloadgit-7e0abcec103b3649943b236881cf88e8fd6cf3a4.zip
git-7e0abcec103b3649943b236881cf88e8fd6cf3a4.tar.gz
git-7e0abcec103b3649943b236881cf88e8fd6cf3a4.tar.bz2
difftool: teach difftool to handle directory diffs
When 'difftool' is called to compare a range of commits that modify more than one file, it opens a separate instance of the diff tool for each file that changed. The new '--dir-diff' option copies all the modified files to a temporary location and runs a directory diff on them in a single instance of the diff tool. Signed-off-by: Tim Henigan <tim.henigan@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-difftool--helper.sh')
-rwxr-xr-xgit-difftool--helper.sh19
1 files changed, 13 insertions, 6 deletions
diff --git a/git-difftool--helper.sh b/git-difftool--helper.sh
index e6558d1..3d0fe0c 100755
--- a/git-difftool--helper.sh
+++ b/git-difftool--helper.sh
@@ -73,9 +73,16 @@ then
fi
fi
-# Launch the merge tool on each path provided by 'git diff'
-while test $# -gt 6
-do
- launch_merge_tool "$1" "$2" "$5"
- shift 7
-done
+if test -n "$GIT_DIFFTOOL_DIRDIFF"
+then
+ LOCAL="$1"
+ REMOTE="$2"
+ run_merge_tool "$merge_tool" false
+else
+ # Launch the merge tool on each path provided by 'git diff'
+ while test $# -gt 6
+ do
+ launch_merge_tool "$1" "$2" "$5"
+ shift 7
+ done
+fi