{"thread":{"id":"66","subject":"[PATCH] show-diff style fix.","startedAt":"2005-04-17T02:15:10Z","lastAt":"2005-04-17T02:15:10Z","messageCount":1,"participants":["Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"417","messageId":"7voece2lox.fsf@assigned-by-dhcp.cox.net","threadId":"66","inReplyTo":null,"subject":"[PATCH] show-diff style fix.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-04-17T02:15:10Z","receivedAt":"2005-04-17T02:15:10Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"This fixes some stylistic problems introduced by my previous set\nof patches.  I'll be sending my last patch to show-diff next,\nwhich depends on this cleanup.\n\nTo be applied on top of my previous patches:\n\n    [PATCH] Optionally tell show-diff to show only named files.\n    [PATCH] show-diff -z option for machine readable output.\n    [PATCH] show-diff shell safety.\n    [PATCH] (take 2) Rename confusing variable in show-diff.\n\nSigned-off-by: Junio C Hamano <junkio@cox.net>\n---\n\n show-diff.c |    7 +++----\n 1 files changed, 3 insertions(+), 4 deletions(-)\n\n--- ./show-diff.c\t2005-04-16 18:59:09.000000000 -0700\n+++ ./show-diff.c\t2005-04-16 19:01:28.000000000 -0700\n@@ -111,7 +111,7 @@\n \t}\n }\n \n-static const char *show_diff_usage = \"show-diff [-s] [-q] [-z] [paths...]\";\n+static const char *show_diff_usage = \"show-diff [-q] [-s] [-z] [paths...]\";\n \n static int matches_pathspec(struct cache_entry *ce, char **spec, int cnt)\n {\n@@ -141,9 +141,8 @@\n \t\t\tsilent_on_nonexisting_files = silent = 1;\n \t\telse if (!strcmp(argv[1], \"-q\"))\n \t\t\tsilent_on_nonexisting_files = 1;\n-\t\telse if (!strcmp(argv[1], \"-z\")) {\n+\t\telse if (!strcmp(argv[1], \"-z\"))\n \t\t\tmachine_readable = 1;\n-\t\t}\n \t\telse\n \t\t\tusage(show_diff_usage);\n \t\targv++; argc--;\n@@ -164,7 +163,7 @@\n \t\tchar type[20];\n \t\tvoid *old;\n \n-\t\tif (1 <argc &&\n+\t\tif (1 < argc &&\n \t\t    ! matches_pathspec(ce, argv+1, argc-1))\n \t\t\tcontinue;\n \n\n"}]}