diff options
author | Junio C Hamano <junkio@cox.net> | 2007-02-24 02:00:32 -0800 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-02-24 02:00:32 -0800 |
commit | 7bd59dee5b4b42f2ed233141e33713a7f012dd22 (patch) | |
tree | d07b995c2af2871be937cc8005d960a95048871f | |
parent | 503ca3a9f23a803080f844f58efcd5b2b1e17a86 (diff) | |
parent | aeabfa072564d9261fa80b1314949bdfd9b78632 (diff) | |
download | git-7bd59dee5b4b42f2ed233141e33713a7f012dd22.tar.gz git-7bd59dee5b4b42f2ed233141e33713a7f012dd22.tar.xz |
Merge branch 'js/apply'
* js/apply:
apply: make --verbose a little more useful
-rw-r--r-- | builtin-apply.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/builtin-apply.c b/builtin-apply.c index 630d8fd65..2dde34186 100644 --- a/builtin-apply.c +++ b/builtin-apply.c @@ -1723,6 +1723,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; @@ -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(new); 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; continue; } - if (!strcmp(arg, "--verbose")) { + if (!strcmp(arg, "-v") || !strcmp(arg, "--verbose")) { apply_verbosely = 1; continue; } |