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

Re: git sometimes stripping one path component in commit mails

From
Junio C Hamano <junkio@cox.net>
Date
Sep 29, 2006, 09:08 UTC
Message-ID
<7v64f7nip1.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.62.0609291034020.28814@pademelon.sonytel.be>
Geert Uytterhoeven <geert@linux-m68k.org> writes:
Show 12 quoted lines
> Is this a current git bug, or a bug in the version used for those mailing
> lists?
>
> | commit 94c12cc7d196bab34aaa98d38521549fa1e5ef76
>...
> | diff --git a/include/asm-s390/irqflags.h b/include/asm-s390/irqflags.h
> | dissimilarity index 65%
> | index 3b566a5..3f26131 100644
> | --- include/asm-s390/irqflags.h
> | +++ include/asm-s390/irqflags.h
>       ^^
>       woops

This is a current git bug (and git bug ever since it started to say "dissimilarity index"). Thanks for noticing, and very sorry for the trouble. It seems that a complete rewrite diff never worked and nobody seriously looked at them.

This should fix it.

-- >8 -- [PATCH] git-diff -B output fix.

Geert noticed that complete rewrite diff missed the usual a/ and b/ leading paths. Pickaxe says it never worked, ever.

Embarrassing.
Signed-off-by: Junio C Hamano <junkio@cox.net>
---
 diff.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/diff.c b/diff.c
index 2464238..17f5a91 100644
--- a/diff.c
+++ b/diff.c
@@ -208,7 +208,7 @@ static void emit_rewrite_diff(const char
 	diff_populate_filespec(two, 0);
 	lc_a = count_lines(one->data, one->size);
 	lc_b = count_lines(two->data, two->size);
-	printf("--- %s\n+++ %s\n@@ -", name_a, name_b);
+	printf("--- a/%s\n+++ b/%s\n@@ -", name_a, name_b);
 	print_line_count(lc_a);
 	printf(" +");
 	print_line_count(lc_b);
-- 
1.4.2.1.gce47b
Previous: Geert Uytterhoeven
Message 2 of 2 in “git sometimes stripping one path component in commit mails”
  1. Geert UytterhoevenSep 29, 2006
  2. Junio C HamanoSep 29, 2006

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.