From: Linus Torvalds Date: Sun, 5 Jun 2005 22:25:28 +0000 (-0700) Subject: git-apply: consider it an error to apply no changes X-Git-Tag: v0.99~354 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=f7b797073c2286fff8c4d46842ed00d868f3b2fa;p=git.git git-apply: consider it an error to apply no changes A "--stat" or a "--check" will just be quiet, but if you try to apply something with no changes, that's an error. --- diff --git a/apply.c b/apply.c index e02e760b..ec63a0c1 100644 --- a/apply.c +++ b/apply.c @@ -1186,6 +1186,9 @@ static void write_out_one_result(struct patch *patch) static void write_out_results(struct patch *list) { + if (!list) + die("No changes"); + while (list) { write_out_one_result(list); list = list->next;