Merge branch 'js/apply'
* js/apply: apply: make --verbose a little more useful
This commit is contained in:
commit
7bd59dee5b
@ -1723,6 +1723,8 @@ static int apply_one_fragment(struct buffer_desc *desc, struct fragment *frag, i
|
|||||||
/* Ignore it, we already handled it */
|
/* Ignore it, we already handled it */
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
if (apply_verbosely)
|
||||||
|
error("invalid start of line: '%c'", first);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
patch += len;
|
patch += len;
|
||||||
@ -1820,6 +1822,9 @@ static int apply_one_fragment(struct buffer_desc *desc, struct fragment *frag, i
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (offset && apply_verbosely)
|
||||||
|
error("while searching for:\n%.*s", oldsize, oldlines);
|
||||||
|
|
||||||
free(old);
|
free(old);
|
||||||
free(new);
|
free(new);
|
||||||
return offset;
|
return offset;
|
||||||
@ -2811,7 +2816,7 @@ int cmd_apply(int argc, const char **argv, const char *unused_prefix)
|
|||||||
apply = apply_with_reject = apply_verbosely = 1;
|
apply = apply_with_reject = apply_verbosely = 1;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!strcmp(arg, "--verbose")) {
|
if (!strcmp(arg, "-v") || !strcmp(arg, "--verbose")) {
|
||||||
apply_verbosely = 1;
|
apply_verbosely = 1;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user