git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Petr Baudis <pasky@ucw.cz>
Date
Apr 23, 2005, 23:43 UTC
Message-ID
<20050423234342.GR13222@pasky.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
Message 1 of 1 in “Fix broken diff-cache output on added files”
  1. Fix broken diff-cache output on added filesPetr Baudis, Apr 23, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.