threads / patch / 51523

patchstop it from failing silently when git apply patch and show err info

Subject: [PATCH] stop it from failing silently when git apply patch and show err info

## tl;dr

One message between Jul 25, 2019 and Jul 25, 2019. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

simon gao· Jul 25, 2019, 10:16 UTC · lore
Signed-off-by: simon gao <simon29rock@gmail.com>
---
 apply.c | 1 +
 1 file changed, 1 insertion(+)
Show changes to apply.c +1 −0
diff --git a/apply.c b/apply.c
index 4992eca..f66a6ff 100644
--- a/apply.c
+++ b/apply.c
@@ -2094,6 +2094,7 @@ static int use_patch(struct apply_state *state, struct patch *p)
 	if (state->prefix && *state->prefix) {
 		const char *rest;
 		if (!skip_prefix(pathname, state->prefix, &rest) || !*rest)
+            error(_("%s doesn't contain the prefix(%s)"), pathname, state->prefix);
 			return 0;
 	}
 
-- 
1.8.3.1

← back to recent threads