{"thread":{"id":"3567","subject":"[PATCH] git-blame: Kill warning \"print_map defined but not used\"","startedAt":"2006-03-05T11:16:50Z","lastAt":"2006-03-05T22:45:23Z","messageCount":3,"participants":["Fredrik Kuivinen","Linus Torvalds","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"17185","messageId":"20060305111650.GC23448@c165.ib.student.liu.se","threadId":"3567","inReplyTo":null,"subject":"[PATCH] git-blame: Kill warning \"print_map defined but not used\"","fromName":"Fredrik Kuivinen","fromEmail":"freku045@student.liu.se","sentAt":"2006-03-05T11:16:50Z","receivedAt":"2006-03-05T11:16:50Z","isPatch":true,"sender":{"key":"frekui@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13770967?v=4"},"body":"\nSigned-off-by: Fredrik Kuivinen <freku045@student.liu.se>\n\n\n---\n\n blame.c |    2 ++\n 1 files changed, 2 insertions(+), 0 deletions(-)\n\naebef8969d11b04634b9ab7a6ae85a0844b2e4c7\ndiff --git a/blame.c b/blame.c\nindex 6dccae5..0fb30ee 100644\n--- a/blame.c\n+++ b/blame.c\n@@ -235,6 +235,7 @@ static void print_patch(struct patch *p)\n }\n \n /* For debugging only */\n+#if DEBUG\n static void print_map(struct commit *cmit, struct commit *other)\n {\n \tstruct util_info *util = cmit->object.util;\n@@ -267,6 +268,7 @@ static void print_map(struct commit *cmi\n \t\tprintf(\"\\n\");\n \t}\n }\n+#endif\n \n // p is a patch from commit to other.\n static void fill_line_map(struct commit *commit, struct commit *other,\n-- \n1.2.4.g4644-dirty\n"},{"id":"17197","messageId":"Pine.LNX.4.64.0603051054330.13139@g5.osdl.org","threadId":"3567","inReplyTo":"20060305111650.GC23448@c165.ib.student.liu.se","subject":"Re: [PATCH] git-blame: Kill warning \"print_map defined but not used\"","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2006-03-05T18:58:19Z","receivedAt":"2006-03-05T18:58:19Z","isPatch":true,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nFredrik,\n\nThree comments on \"git-blame\":\n\n - you should use \"-u -U 0\" instead of \"-u0\" to avoid warnings from some \n   versions of GNU diff\n\n - Please default to HEAD so that you don't need to say it.\n\n - What I'd actually want to see is blame for a certain group of lines. \n   Ie, I'd like to see\n\n\tgit-blame --line=50-56 filename\n\n   which only shows those 7 lines. That would be wonderful for a visual \n   interface where you could mark off a few lines and say \"follow these \n   backwards\" kind of thing, and should make it more efficient than trying \n   to resolve the _whole_ file.\n\nHmm?\n\n\t\tLinus\n"},{"id":"17206","messageId":"7vmzg4ecjg.fsf@assigned-by-dhcp.cox.net","threadId":"3567","inReplyTo":"Pine.LNX.4.64.0603051054330.13139@g5.osdl.org","subject":"Re: [PATCH] git-blame: Kill warning \"print_map defined but not used\"","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-03-05T22:45:23Z","receivedAt":"2006-03-05T22:45:23Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Linus Torvalds <torvalds@osdl.org> writes:\n\n>  - you should use \"-u -U 0\" instead of \"-u0\" to avoid warnings from some \n>    versions of GNU diff\n\nOne liner here.\n\n>  - Please default to HEAD so that you don't need to say it.\n\nFredrik's latest patch already does.\n\n-- >8 --\nSubject: [PATCH] blame: avoid \"diff -u0\".\n\nAs Linus suggests, use \"diff -u -U 0\" instead.\n\nSigned-off-by: Junio C Hamano <junkio@cox.net>\n\n---\n\n blame.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\n1f7d9585190c22a4c019487444d9e461e08baa0e\ndiff --git a/blame.c b/blame.c\nindex a3a8ddc..141e4c6 100644\n--- a/blame.c\n+++ b/blame.c\n@@ -92,7 +92,7 @@ static struct patch *get_patch(struct co\n \t\tdie(\"write failed: %s\", strerror(errno));\n \tclose(fd);\n \n-\tsprintf(diff_cmd, \"diff -u0 %s %s\", tmp_path1, tmp_path2);\n+\tsprintf(diff_cmd, \"diff -u -U 0 %s %s\", tmp_path1, tmp_path2);\n \tfin = popen(diff_cmd, \"r\");\n \tif (!fin)\n \t\tdie(\"popen failed: %s\", strerror(errno));\n-- \n1.2.4.gee5c7\n"}]}