summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2007-07-02 08:45:12 (GMT)
committerJunio C Hamano <gitster@pobox.com>2007-07-02 08:45:12 (GMT)
commite1bc8dc66dd5a2ef8b23c6b7cac8164d85e73307 (patch)
treee0611ad20c9a515a0bd4378749e9b3cac41560e3 /diff.c
parent792d2370f975f032a708cb35044193b5b5310840 (diff)
parentb9905fed7a028cc9749cf8ad479cbb07940c8638 (diff)
downloadgit-e1bc8dc66dd5a2ef8b23c6b7cac8164d85e73307.zip
git-e1bc8dc66dd5a2ef8b23c6b7cac8164d85e73307.tar.gz
git-e1bc8dc66dd5a2ef8b23c6b7cac8164d85e73307.tar.bz2
Merge branch 'jc/diffcore'
* jc/diffcore: diffcore-delta.c: Ignore CR in CRLF for text files diffcore-delta.c: update the comment on the algorithm. diffcore_filespec: add is_binary diffcore_count_changes: pass diffcore_filespec
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/diff.c b/diff.c
index e0edb98..93eca79 100644
--- a/diff.c
+++ b/diff.c
@@ -3005,6 +3005,22 @@ void diffcore_std(struct diff_options *options)
{
if (options->quiet)
return;
+
+ /*
+ * break/rename count similarity differently depending on
+ * the binary-ness.
+ */
+ if ((options->break_opt != -1) || (options->detect_rename)) {
+ struct diff_queue_struct *q = &diff_queued_diff;
+ int i;
+
+ for (i = 0; i < q->nr; i++) {
+ struct diff_filepair *p = q->queue[i];
+ p->one->is_binary = file_is_binary(p->one);
+ p->two->is_binary = file_is_binary(p->two);
+ }
+ }
+
if (options->break_opt != -1)
diffcore_break(options->break_opt);
if (options->detect_rename)