[PATCH] Mode only changes from diff.
This fixes another bug. - Mode-only changes were pruned incorrectly from the output. - Added test to catch the above problem. - Normalize rename/copy similarity score in the diff-raw output to per-cent, no matter what scale we internally use. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:

committed by
Linus Torvalds

parent
96716a1976
commit
9fdade0673
@ -4,6 +4,7 @@
|
||||
#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';
|
||||
@ -77,6 +78,7 @@ 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);
|
||||
|
Reference in New Issue
Block a user