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

Bug in diff header generation

From
MKMatthias Kestenholz <lists@spinlock.ch>
Date
Mar 2, 2007, 12:53 UTC
Message-ID
<1172840031.22581.3.camel@localhost.localdomain>
Hello,

I've encountered a small error in the diff header generation when diffing against files which are not tracked by git:

[13:49] mk@crap ~/Projects/git > git diff git.c ~/bin/viname|head
diff --git a/git.c b/home/mk/bin/viname
old mode 100644
new mode 100755
index 008e016..b64857e
--- a/git.c
+++ b/home/mk/bin/viname
@@ -1,416 +1,106 @@
-#include "builtin.h"
-#include "exec_cmd.h"
-#include "cache.h"
[13:49] mk@crap ~/Projects/git > git diff HEAD:git.c ~/bin/viname|head
diff --git a/home/mk/bin/viname b/home/mk/bin/viname
index 008e016..b64857e 100755
--- a/home/mk/bin/viname
+++ b/home/mk/bin/viname
@@ -1,416 +1,106 @@
-#include "builtin.h"
-#include "exec_cmd.h"
-#include "cache.h"
-#include "quote.h"
-


When a revision is specified, git-diff prints a/home/mk/bin/viname
instead of a/git.c

Because of my final exams I've got no time to look into it right now.


Matthias
Next: Johannes Schindelin
Message 1 of 2 in “Bug in diff header generation”
  1. Matthias KestenholzMar 2, 2007
  2. Johannes SchindelinMar 2, 2007

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.