[PATCH] Tutorial update to adjust for -B fix
[gitweb.git] / diff.c
diff --git a/diff.c b/diff.c
index 2762905b56a6a247f661a12d1573f1877d29a959..d6661f82684fac739513bd7fea710c98c8f80663 100644 (file)
--- a/diff.c
+++ b/diff.c
@@ -555,6 +555,7 @@ static void run_diff(const char *name,
 {
        const char *pgm = external_diff();
        if (!pgm &&
+           one && two &&
            DIFF_FILE_VALID(one) && DIFF_FILE_VALID(two) &&
            (S_IFMT & one->mode) != (S_IFMT & two->mode)) {
                /* a filepair that changes between file and symlink
@@ -661,6 +662,7 @@ struct diff_filepair *diff_queue(struct diff_queue_struct *queue,
        dp->one = one;
        dp->two = two;
        dp->score = 0;
+       dp->status = 0;
        dp->source_stays = 0;
        dp->broken_pair = 0;
        diff_q(queue, dp);
@@ -786,8 +788,8 @@ static void diff_flush_patch(struct diff_filepair *p)
        case 'R':
                sprintf(msg_,
                        "similarity index %d%%\n"
-                       "rename old %s\n"
-                       "rename new %s",
+                       "rename from %s\n"
+                       "rename to %s",
                        (int)(0.5 + p->score * 100.0/MAX_SCORE),
                        p->one->path, p->two->path);
                msg = msg_;