diff options
author | Junio C Hamano <gitster@pobox.com> | 2007-06-29 07:56:07 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-07-01 05:51:31 +0200 |
commit | 706098af6b53403b5ea3db9216fb99afbe06f52d (patch) | |
tree | d433db47ca354e5de3c229066e96c413ab33a976 /diff.c | |
parent | diffcore_count_changes: pass diffcore_filespec (diff) | |
download | git-706098af6b53403b5ea3db9216fb99afbe06f52d.tar.xz git-706098af6b53403b5ea3db9216fb99afbe06f52d.zip |
diffcore_filespec: add is_binary
diffcore-break and diffcore-rename would want to behave slightly
differently depending on the binary-ness of the data, so add one
bit to the filespec, as the structure is now passed down to
diffcore_count_changes() function.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff.c')
-rw-r--r-- | diff.c | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -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) |