git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] show-branch: Indentation for show-branch usage
@ 2015-01-08 18:08 Alexander Kuleshov
  2015-01-08 20:05 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Alexander Kuleshov @ 2015-01-08 18:08 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, Alexander Kuleshov

Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
---
 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
 };
-- 
2.2.1.268.g1e6f5b2.dirty

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] show-branch: Indentation for show-branch usage
  2015-01-08 18:08 [PATCH] show-branch: Indentation for show-branch usage Alexander Kuleshov
@ 2015-01-08 20:05 ` Junio C Hamano
  2015-01-08 20:27   ` Alexander Kuleshov
  0 siblings, 1 reply; 3+ messages in thread
From: Junio C Hamano @ 2015-01-08 20:05 UTC (permalink / raw)
  To: Alexander Kuleshov; +Cc: git

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
>  };

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] show-branch: Indentation for show-branch usage
  2015-01-08 20:05 ` Junio C Hamano
@ 2015-01-08 20:27   ` Alexander Kuleshov
  0 siblings, 0 replies; 3+ messages in thread
From: Alexander Kuleshov @ 2015-01-08 20:27 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git@vger.kernel.org

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>:
> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-01-08 20:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-08 18:08 [PATCH] show-branch: Indentation for show-branch usage Alexander Kuleshov
2015-01-08 20:05 ` Junio C Hamano
2015-01-08 20:27   ` Alexander Kuleshov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).