git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] show-branch: Indentation for show-branch usage

From
Alexander Kuleshov <kuleshovmail@gmail.com>
Date
Jan 8, 2015, 20:27 UTC
Message-ID
<CANCZXo6MvQ1EHXg18P1GZ9Vov3si780Jeh5oLdAdBju-XTnavw@mail.gmail.com>
In-Reply-To
<xmqqsifldone.fsf@gitster.dls.corp.google.com>
No it doesn't breaks N_ macro. Will resend the patch.
2015-01-09 2:05 GMT+06:00 Junio C Hamano <gitster@pobox.com>:
Show 45 quoted lines
> Alexander Kuleshov <kuleshovmail@gmail.com> writes:
>
>> Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
>> ---
>
> s/Indentation for/line-wrap/, perhaps?
>
> What the patch wants to do makes sense to me, but I haven't seen a
> long multi-line string, each lines in which is terminated with "\n\"
> in the source, fed to N_() macro anywhere else in the existing
> codebase, which makes me a bit nervous.
>
> Would writing it this way instead, i.e. making it more obvious where
> each line begins and how long the indentation of subsequent lines are,
> also work?
>
>         N_("git show-branch [-a|--all] ...\n"
>            "                [--current] [--color[=<when>]] ...\n"
>            ...
>            "                [--no-name ...");
>
> Or does it break N_() macro?
>
> Thanks.
>
>
>>  builtin/show-branch.c | 5 ++++-
>>  1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/builtin/show-branch.c b/builtin/show-branch.c
>> index 270e39c..2e60107 100644
>> --- a/builtin/show-branch.c
>> +++ b/builtin/show-branch.c
>> @@ -6,7 +6,10 @@
>>  #include "parse-options.h"
>>
>>  static const char* show_branch_usage[] = {
>> -    N_("git show-branch [-a|--all] [-r|--remotes] [--topo-order | --date-order] [--current] [--color[=<when>] | --no-color] [--sparse] [--more=<n> | --list | --independent | --merge-base] [--no-name | --sha1-name] [--topics] [(<rev> | <glob>)...]"),
>> +    N_("git show-branch [-a|--all] [-r|--remotes] [--topo-order | --date-order]\n\
>> +                       [--current] [--color[=<when>] | --no-color] [--sparse]\n\
>> +                       [--more=<n> | --list | --independent | --merge-base]\n\
>> +                       [--no-name | --sha1-name] [--topics] [(<rev> | <glob>)...]"),
>>      N_("git show-branch (-g|--reflog)[=<n>[,<base>]] [--list] [<ref>]"),
>>      NULL
>>  };
-- 
_________________________
0xAX
Previous: Junio C Hamano
Message 3 of 3 in “show-branch: Indentation for show-branch usage”
  1. show-branch: Indentation for show-branch usageAlexander Kuleshov, Jan 8, 2015
  2. Junio C HamanoJan 8, 2015
  3. Alexander KuleshovJan 8, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.