From: simon gao <simon29rock@gmail.com>
To: git@vger.kernel.org
Cc: simon gao <simon29rock@gmail.com>
Subject: [PATCH] stop it from failing silently when git apply patch and show err info
Date: Thu, 25 Jul 2019 06:43:45 -0400 [thread overview]
Message-ID: <1564051425-69139-1-git-send-email-simon29rock@gmail.com> (raw)
Signed-off-by: simon gao <simon29rock@gmail.com>
---
apply.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/apply.c b/apply.c
index 4992eca..47b16aa 100644
--- a/apply.c
+++ b/apply.c
@@ -2093,8 +2093,10 @@ static int use_patch(struct apply_state *state, struct patch *p)
/* Paths outside are not touched regardless of "--include" */
if (state->prefix && *state->prefix) {
const char *rest;
- if (!skip_prefix(pathname, state->prefix, &rest) || !*rest)
+ if (!skip_prefix(pathname, state->prefix, &rest) || !*rest){
+ error(_("%s doesn't contain the prefix(%s)"), pathname, state->prefix);
return 0;
+ }
}
/* See if it matches any of exclude/include rule */
--
1.8.3.1
next reply other threads:[~2019-07-25 10:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-25 10:43 simon gao [this message]
2019-07-25 12:15 ` [PATCH] stop it from failing silently when git apply patch and show err info simon gao
-- strict thread matches above, loose matches on Subject: below --
2019-07-25 10:16 simon gao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1564051425-69139-1-git-send-email-simon29rock@gmail.com \
--to=simon29rock@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).