{"thread":{"id":"18528","subject":"[PATCH] difftool: add a -y shortcut for --no-prompt","startedAt":"2009-03-25T06:29:59Z","lastAt":"2009-03-28T08:56:02Z","messageCount":2,"participants":["David Aguilar","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"109321","messageId":"1237962599-29625-1-git-send-email-davvid@gmail.com","threadId":"18528","inReplyTo":null,"subject":"[PATCH] difftool: add a -y shortcut for --no-prompt","fromName":"David Aguilar","fromEmail":"davvid@gmail.com","sentAt":"2009-03-25T06:29:59Z","receivedAt":"2009-03-25T06:29:59Z","isPatch":true,"sender":{"key":"davvid@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13196?v=4"},"body":"This is another consistency cleanup to make git-difftool's options\nmatch git-mergetool.\n\nSigned-off-by: David Aguilar <davvid@gmail.com>\n---\n\nThis also fixes the style used for the -h option which I should\nhave caught in my previous patch.  Doh!\n\n Documentation/git-difftool.txt |    3 ++-\n git-difftool.perl              |    6 +++---\n 2 files changed, 5 insertions(+), 4 deletions(-)\n\ndiff --git a/Documentation/git-difftool.txt b/Documentation/git-difftool.txt\nindex 23070c1..be1020d 100644\n--- a/Documentation/git-difftool.txt\n+++ b/Documentation/git-difftool.txt\n@@ -7,7 +7,7 @@ git-difftool - Show changes using common diff tools\n \n SYNOPSIS\n --------\n-'git difftool' [--tool=<tool>] [--no-prompt] [<'git diff' options>]\n+'git difftool' [--tool=<tool>] [-y|--no-prompt] [<'git diff' options>]\n \n DESCRIPTION\n -----------\n@@ -17,6 +17,7 @@ to 'git-diff' and accepts the same options and arguments.\n \n OPTIONS\n -------\n+-y::\n --no-prompt::\n \tDo not prompt before launching a diff tool.\n \ndiff --git a/git-difftool.perl b/git-difftool.perl\nindex 207dd50..5bc64d5 100755\n--- a/git-difftool.perl\n+++ b/git-difftool.perl\n@@ -18,7 +18,7 @@ my $DIR = abs_path(dirname($0));\n sub usage\n {\n \tprint << 'USAGE';\n-usage: git difftool [--tool=<tool>] [--no-prompt] [\"git diff\" options]\n+usage: git difftool [--tool=<tool>] [-y|--no-prompt] [\"git diff\" options]\n USAGE\n \texit 1;\n }\n@@ -60,11 +60,11 @@ sub generate_command\n \t\t\t$ENV{GIT_DIFF_TOOL} = substr($arg, 7);\n \t\t\tnext;\n \t\t}\n-\t\tif ($arg eq '--no-prompt') {\n+\t\tif ($arg eq '-y' || '--no-prompt') {\n \t\t\t$ENV{GIT_DIFFTOOL_NO_PROMPT} = 'true';\n \t\t\tnext;\n \t\t}\n-\t\tif ($arg eq '-h' or $arg eq '--help') {\n+\t\tif ($arg eq '-h' || $arg eq '--help') {\n \t\t\tusage();\n \t\t}\n \t\tpush @command, $arg;\n-- \n1.6.2.1.303.g63699\n"},{"id":"109693","messageId":"7veiwivxel.fsf@gitster.siamese.dyndns.org","threadId":"18528","inReplyTo":"1237962599-29625-1-git-send-email-davvid@gmail.com","subject":"Re: [PATCH] difftool: add a -y shortcut for --no-prompt","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-03-28T08:56:02Z","receivedAt":"2009-03-28T08:56:02Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"David Aguilar <davvid@gmail.com> writes:\n\n> This is another consistency cleanup to make git-difftool's options\n> match git-mergetool.\n> ...\n> @@ -60,11 +60,11 @@ sub generate_command\n>  \t\t\t$ENV{GIT_DIFF_TOOL} = substr($arg, 7);\n>  \t\t\tnext;\n>  \t\t}\n> -\t\tif ($arg eq '--no-prompt') {\n> +\t\tif ($arg eq '-y' || '--no-prompt') {\n\nThis was the typo that broke 'pu'; I fixed it up and re-queued the series.\n"}]}