# [PATCH] Fix broken diff-cache output on added files

1 messages from 2005-04-23 to 2005-04-23. Participants: Petr Baudis.
Thread: https://gitlist.dev/t/272

## Petr Baudis, 2005-04-23 23:43

Subject: [PATCH] Fix broken diff-cache output on added files
Message-ID: <20050423234342.GR13222@pasky.ji.cz>
URL: https://gitlist.dev/e/20050423234342.GR13222%40pasky.ji.cz

```
Added files were errorneously reported with the - prefix by diff-cache,
obviously leading to great confusion.

Signed-off-by: Petr Baudis <pasky@ucw.cz>

Index: diff-cache.c
===================================================================
--- 099679c62a98433d9d9b38581f39563c9574478e/diff-cache.c  (mode:100644 sha1:b407d753e520fa0b1523d770d98b3015af197275)
+++ 3df862ae5cc66733dab3d8bd5c4ea359b2ca1884/diff-cache.c  (mode:100644 sha1:2ec6c29ab6b79a10277a2ff9021a2032d656abf0)
@@ -57,7 +57,7 @@
 		}
 		/* 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;


-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
C++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor

```
