Skip to content

Commit 903d475

Browse files
Junio C HamanoLinus Torvalds
authored andcommitted
[PATCH] Do not expose internal scaling to diff-helper.
Instead we can normalize what diff-raw records at the diffcore side. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1 parent 1a0756f commit 903d475

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

diff-helper.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
#include "cache.h"
55
#include "strbuf.h"
66
#include "diff.h"
7-
#include "diffcore.h" /* just for MAX_SCORE */
87

98
static const char *pickaxe = NULL;
109
static int line_termination = '\n';
@@ -78,7 +77,6 @@ int main(int ac, const char **av) {
7877
if (status == 'R' || status == 'C') {
7978
two_paths = 1;
8079
sscanf(cp, "%d", &score);
81-
score = score * MAX_SCORE / 100;
8280
if (line_termination) {
8381
cp = strchr(cp,
8482
inter_name_termination);

diff.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -886,7 +886,7 @@ void diff_helper_input(unsigned old_mode,
886886
if (new_mode)
887887
fill_filespec(two, new_sha1, new_mode);
888888
dp = diff_queue(&diff_queued_diff, one, two);
889-
dp->score = score;
889+
dp->score = score * MAX_SCORE / 100;
890890
dp->status = status;
891891
}
892892

0 commit comments

Comments
 (0)