[PATCH 05/12] Do not expose internal scaling to diff-helper.
- From
Junio C Hamano <junkio@cox.net>
- Date
- May 27, 2005, 22:53 UTC
- Message-ID
- <7vll6046xg.fsf_-_@assigned-by-dhcp.cox.net>
- In-Reply-To
- <7vk6lk5lxt.fsf_-_@assigned-by-dhcp.cox.net>
Instead we can normalize what diff-raw records at the diffcore side.
Signed-off-by: Junio C Hamano <junkio@cox.net> ---
diff-helper.c | 2 -- diff.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/diff-helper.c b/diff-helper.c --- a/diff-helper.c +++ b/diff-helper.c @@ -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'; @@ -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); diff --git a/diff.c b/diff.c --- a/diff.c +++ b/diff.c @@ -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; } ------------------------------------------------