{"thread":{"id":"51360","subject":"[PATCH v2] doc: improve usage string in MyFirstContribution","startedAt":"2019-06-22T06:11:07Z","lastAt":"2019-06-22T06:11:07Z","messageCount":1,"participants":["Christian Couder"],"isPatch":true,"patchVersion":2,"patchTotal":null},"messages":[{"id":"377803","messageId":"20190622061035.1612-1-chriscool@tuxfamily.org","threadId":"51360","inReplyTo":null,"subject":"[PATCH v2] doc: improve usage string in MyFirstContribution","fromName":"Christian Couder","fromEmail":"christian.couder@gmail.com","sentAt":"2019-06-22T06:10:35Z","receivedAt":"2019-06-22T06:11:07Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"We implement a command called git-psuh which accept arguments, so let's\nshow that it accepts arguments in the doc and the usage string.\n\nWhile at it, we need to prepare \"a NULL-terminated array of usage strings\",\nnot just \"a NULL-terminated usage string\".\n\nHelped-by: Emily Shaffer <emilyshaffer@google.com>\nHelped-by: Eric Sunshine <sunshine@sunshineco.com>\nSigned-off-by: Christian Couder <chriscool@tuxfamily.org>\n---\n\nThe only change compared to he previous version is that \"[<arg>...]\" is\nused instead of \"<arg>...\" in the synopsis and help message as discussed\nwith Emily, Eric and Junio.\n\n Documentation/MyFirstContribution.txt | 12 +++++++-----\n 1 file changed, 7 insertions(+), 5 deletions(-)\n\ndiff --git a/Documentation/MyFirstContribution.txt b/Documentation/MyFirstContribution.txt\nindex 895b7cfd4f..f8670379c0 100644\n--- a/Documentation/MyFirstContribution.txt\n+++ b/Documentation/MyFirstContribution.txt\n@@ -428,7 +428,7 @@ git-psuh - Delight users' typo with a shy horse\n SYNOPSIS\n --------\n [verse]\n-'git-psuh'\n+'git-psuh [<arg>...]'\n \n DESCRIPTION\n -----------\n@@ -491,14 +491,16 @@ Take a look at `Documentation/technical/api-parse-options.txt`. This is a handy\n tool for pulling out options you need to be able to handle, and it takes a\n usage string.\n \n-In order to use it, we'll need to prepare a NULL-terminated usage string and a\n-`builtin_psuh_options` array. Add a line to `#include \"parse-options.h\"`.\n+In order to use it, we'll need to prepare a NULL-terminated array of usage\n+strings and a `builtin_psuh_options` array.\n \n-At global scope, add your usage:\n+Add a line to `#include \"parse-options.h\"`.\n+\n+At global scope, add your array of usage strings:\n \n ----\n static const char * const psuh_usage[] = {\n-\tN_(\"git psuh\"),\n+\tN_(\"git psuh [<arg>...]\"),\n \tNULL,\n };\n ----\n-- \n2.22.0.206.geb73f2e638\n\n"}]}