{"thread":{"id":"5757","subject":"git sometimes stripping one path component in commit mails","startedAt":"2006-09-29T08:41:26Z","lastAt":"2006-09-29T09:08:42Z","messageCount":2,"participants":["Geert Uytterhoeven","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"27989","messageId":"Pine.LNX.4.62.0609291034020.28814@pademelon.sonytel.be","threadId":"5757","inReplyTo":null,"subject":"git sometimes stripping one path component in commit mails","fromName":"Geert Uytterhoeven","fromEmail":"geert@linux-m68k.org","sentAt":"2006-09-29T08:41:26Z","receivedAt":"2006-09-29T08:41:26Z","isPatch":false,"sender":{"key":"geert@linux-m68k.org","avatar":"https://gravatar.com/avatar/8105b34f653a7b5b98e225e565b11ebcc762ad4ab1a9d905a4663db029a9e6bc?d=mp&s=160"},"body":"\tHi,\n\nI noticed git sometimes strips one path component from the filenames in the\npatches mailed to the git-commits mailing lists. This causes problems when\npiping these mails through diffstat.\n\nHere is a part of an actual mail received through\ngit-commits-head@vger.kernel.org to demonstrate this issue:\n\nIs this a current git bug, or a bug in the version used for those mailing\nlists?\n\n| commit 94c12cc7d196bab34aaa98d38521549fa1e5ef76\n| tree 8e0cec0ed44445d74a2cb5160303d6b4dfb1bc31\n| parent 25d83cbfaa44e1b9170c0941c3ef52ca39f54ccc\n| author Martin Schwidefsky <schwidefsky@de.ibm.com> 1159455403 +0200\n| committer Martin Schwidefsky <schwidefsky@de.ibm.com> 1159455403 +0200\n\n| diff --git a/include/asm-s390/irqflags.h b/include/asm-s390/irqflags.h\n| dissimilarity index 65%\n| index 3b566a5..3f26131 100644\n| --- include/asm-s390/irqflags.h\n| +++ include/asm-s390/irqflags.h\n      ^^\n      woops\n\n| diff --git a/include/asm-s390/lowcore.h b/include/asm-s390/lowcore.h\n| index 18695d1..06583ed 100644\n| --- a/include/asm-s390/lowcore.h\n| +++ b/include/asm-s390/lowcore.h\n      ^^\n      OK\n\nGr{oetje,eeting}s,\n\n\t\t\t\t\t\tGeert\n\n--\nGeert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org\n\nIn personal conversations with technical people, I call myself a hacker. But\nwhen I'm talking to journalists I just say \"programmer\" or something like that.\n\t\t\t\t\t\t\t    -- Linus Torvalds\n"},{"id":"27990","messageId":"7v64f7nip1.fsf@assigned-by-dhcp.cox.net","threadId":"5757","inReplyTo":"Pine.LNX.4.62.0609291034020.28814@pademelon.sonytel.be","subject":"Re: git sometimes stripping one path component in commit mails","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-09-29T09:08:42Z","receivedAt":"2006-09-29T09:08:42Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Geert Uytterhoeven <geert@linux-m68k.org> writes:\n\n> Is this a current git bug, or a bug in the version used for those mailing\n> lists?\n>\n> | commit 94c12cc7d196bab34aaa98d38521549fa1e5ef76\n>...\n> | diff --git a/include/asm-s390/irqflags.h b/include/asm-s390/irqflags.h\n> | dissimilarity index 65%\n> | index 3b566a5..3f26131 100644\n> | --- include/asm-s390/irqflags.h\n> | +++ include/asm-s390/irqflags.h\n>       ^^\n>       woops\n\nThis is a current git bug (and git bug ever since it started to\nsay \"dissimilarity index\").  Thanks for noticing, and very sorry\nfor the trouble.  It seems that a complete rewrite diff never\nworked and nobody seriously looked at them.\n\nThis should fix it.\n\n-- >8 --\n[PATCH] git-diff -B output fix.\n\nGeert noticed that complete rewrite diff missed the usual a/ and b/\nleading paths.  Pickaxe says it never worked, ever.\n\nEmbarrassing.\n\nSigned-off-by: Junio C Hamano <junkio@cox.net>\n---\n diff.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/diff.c b/diff.c\nindex 2464238..17f5a91 100644\n--- a/diff.c\n+++ b/diff.c\n@@ -208,7 +208,7 @@ static void emit_rewrite_diff(const char\n \tdiff_populate_filespec(two, 0);\n \tlc_a = count_lines(one->data, one->size);\n \tlc_b = count_lines(two->data, two->size);\n-\tprintf(\"--- %s\\n+++ %s\\n@@ -\", name_a, name_b);\n+\tprintf(\"--- a/%s\\n+++ b/%s\\n@@ -\", name_a, name_b);\n \tprint_line_count(lc_a);\n \tprintf(\" +\");\n \tprint_line_count(lc_b);\n-- \n1.4.2.1.gce47b\n"}]}