git-apply: consider it an error to apply no changes
[git.git] / apply.c
diff --git a/apply.c b/apply.c
index e02e760..ec63a0c 100644 (file)
--- 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;