Skip to content

Commit

Permalink
[PATCH] Do not expose internal scaling to diff-helper.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Junio C Hamano authored and Linus Torvalds committed May 29, 2005
1 parent 1a0756f commit 903d475
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions diff-helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include "cache.h"
#include "strbuf.h"
#include "diff.h"
#include "diffcore.h" /* just for MAX_SCORE */

static const char *pickaxe = NULL;
static int line_termination = '\n';
Expand Down Expand Up @@ -78,7 +77,6 @@ int main(int ac, const char **av) {
if (status == 'R' || status == 'C') {
two_paths = 1;
sscanf(cp, "%d", &score);
score = score * MAX_SCORE / 100;
if (line_termination) {
cp = strchr(cp,
inter_name_termination);
Expand Down
2 changes: 1 addition & 1 deletion diff.c
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,7 @@ void diff_helper_input(unsigned old_mode,
if (new_mode)
fill_filespec(two, new_sha1, new_mode);
dp = diff_queue(&diff_queued_diff, one, two);
dp->score = score;
dp->score = score * MAX_SCORE / 100;
dp->status = status;
}

Expand Down

0 comments on commit 903d475

Please sign in to comment.