[PATCH] read-tree: update documentation for 3-way merge.
[git.git] / apply.c
diff --git a/apply.c b/apply.c
index e02e760..1f48ef9 100644 (file)
--- a/apply.c
+++ b/apply.c
@@ -437,6 +437,8 @@ static int parse_git_header(char *line, int len, unsigned int size, struct patch
                        { "copy to ", gitdiff_copydst },
                        { "rename old ", gitdiff_renamesrc },
                        { "rename new ", gitdiff_renamedst },
+                       { "rename from ", gitdiff_renamesrc },
+                       { "rename to ", gitdiff_renamedst },
                        { "similarity index ", gitdiff_similarity },
                        { "dissimilarity index ", gitdiff_dissimilarity },
                        { "", gitdiff_unrecognized },
@@ -1186,6 +1188,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;