built-in diff: minimum tweaks
authorJunio C Hamano <junkio@cox.net>
Sat, 25 Mar 2006 20:16:17 +0000 (12:16 -0800)
committerJunio C Hamano <junkio@cox.net>
Sun, 26 Mar 2006 00:50:00 +0000 (16:50 -0800)
commit3ce8f08944e614813c7dfb212a88b7c4e3b443bc
tree0ea80c1ceb83a898851ff8d097db9a5b157e0189
parent621c53cc082299eaf69e9f2dc0274547c7d87fb0
built-in diff: minimum tweaks

This fixes up a couple of minor issues with the real built-in
diff to be more usable:

 - Omit ---/+++ header unless we emit diff output;

 - Detect and punt binary diff like GNU does;

 - Honor GIT_DIFF_OPTS minimally (only -u<number> and
   --unified=<number> are currently supported);

 - Omit line count of 1 from "@@ -l,k +m,n @@" hunk header
   (i.e. when k == 1 or n == 1)

 - Adjust testsuite for the lack of -p support.

Signed-off-by: Junio C Hamano <junkio@cox.net>
diff.c
t/t4001-diff-rename.sh
xdiff/xutils.c