summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 437b1b2)
raw | patch | inline | side by side (parent: 437b1b2)
author | Johannes Schindelin <Johannes.Schindelin@gmx.de> | |
Thu, 22 Feb 2007 19:11:21 +0000 (20:11 +0100) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Fri, 23 Feb 2007 04:58:36 +0000 (20:58 -0800) |
When a patch fails, I automatically add '-v' to the command line
to see what fails.
This patch makes -v a synonym to --verbose, and actually tells
the user which text was not found.
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
to see what fails.
This patch makes -v a synonym to --verbose, and actually tells
the user which text was not found.
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-apply.c | patch | blob | history |
diff --git a/builtin-apply.c b/builtin-apply.c
index 3fefdacd94526b62ac72707d6d80b039f104c06d..17f4ad595e54d9bf46620b481a07becb524c5e14 100644 (file)
--- a/builtin-apply.c
+++ b/builtin-apply.c
@@ -1655,6 +1655,8 @@ static int apply_one_fragment(struct buffer_desc *desc, struct fragment *frag, i
/* Ignore it, we already handled it */
break;
default:
+ if (apply_verbosely)
+ error("invalid start of line: '%c'", first);
return -1;
}
patch += len;
@@ -1752,6 +1754,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(new);
return offset;
apply = apply_with_reject = apply_verbosely = 1;
continue;
}
- if (!strcmp(arg, "--verbose")) {
+ if (!strcmp(arg, "-v") || !strcmp(arg, "--verbose")) {
apply_verbosely = 1;
continue;
}