[PATCH] Fix broken diff-cache output on added files
authorPetr Baudis <pasky@ucw.cz>
Sun, 24 Apr 2005 01:05:07 +0000 (18:05 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Sun, 24 Apr 2005 01:05:07 +0000 (18:05 -0700)
Added files were errorneously reported with the - prefix by diff-cache,
obviously leading to great confusion.

Signed-off-by: Petr Baudis <pasky@ucw.cz>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
diff-cache.c

index b407d75..2ec6c29 100644 (file)
@@ -57,7 +57,7 @@ static int diff_cache(struct cache_entry **ac, int entries)
                }
                /* No matching 1-stage (tree) entry? Show the current one as added */
                if (entries == 1 || !same_name(ce, ac[1])) {
-                       show_file("-", ce);
+                       show_file("+", ce);
                        ac++;
                        entries--;
                        continue;