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

[PATCH] Built-in diff driver shows Index: line.

From
Junio C Hamano <junkio@cox.net>
Date
Apr 28, 2005, 19:14 UTC
Message-ID
<7vy8b27lyf.fsf@assigned-by-dhcp.cox.net>

As suggested by Linus as a workaround to unconfuse diffstat, this patch adds Index: line before the diff output the built-in driver produces.

Signed-off-by: Junio C Hamano <junkio@cox.net>
---

diff.c | 2 ++ 1 files changed, 2 insertions(+)

# - 04/28 11:20 No need to say diff-tree -p -r in git-export # + 04/28 11:25 Show Index: line from built-in diff driver.

Index: diff.c
--- k/diff.c  (mode:100644)
+++ l/diff.c  (mode:100644)
@@ -125,6 +125,8 @@ static void builtin_diff(const char *nam
 	next_at += snprintf(cmd+next_at, cmd_size-next_at,
 			    diff_arg, input_name_sq[0], input_name_sq[1]);
 
+	printf("Index: %s\n", name);
+	fflush(NULL);
 	execlp("/bin/sh","sh", "-c", cmd, NULL);
 }
 
Next: Linus Torvalds
Message 1 of 5 in “Built-in diff driver shows Index: line.”
  1. Built-in diff driver shows Index: line.Junio C Hamano, Apr 28, 2005
  2. Linus TorvaldsApr 28, 2005
  3. Junio C HamanoApr 28, 2005
  4. Linus TorvaldsApr 28, 2005
  5. Junio C HamanoApr 28, 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.