summaryrefslogtreecommitdiff
path: root/apply.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-05 15:25:28 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-05 15:25:28 -0700
commitf7b797073c2286fff8c4d46842ed00d868f3b2fa (patch)
tree90cc322268d343db7f267c8bb65c5471c48ed24e /apply.c
parent1a93a7662d6f8c3a4f48cb9468eb494ec823f2a5 (diff)
downloadgit-f7b797073c2286fff8c4d46842ed00d868f3b2fa.tar.gz
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.
Diffstat (limited to 'apply.c')
-rw-r--r--apply.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/apply.c b/apply.c
index e02e760be2..ec63a0c1e0 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;