Skip to contentSkip to conversation

show-branch: Indentation for show-branch usage

PATCH In review Alexander Kuleshov 2 participants 3 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 show-branch: Indentation for show-branch usage

---
 builtin/show-branch.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
builtin/show-branch.c +4 -1
index 270e39c..2e60107 100644
@@ -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
 };
Signature · 1 line
2.2.1.268.g1e6f5b2.dirty
#1 lore raw
Quoted 2 lines · Alexander Kuleshov

---

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.

Quoted 19 lines
 builtin/show-branch.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
builtin/show-branch.c +4 -1
index 270e39c..2e60107 100644
@@ -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 lore raw

No it doesn't breaks N_ macro. Will resend the patch.

2015-01-09 2:05 GMT+06:00 Junio C Hamano <[email protected]>:

Quoted 45 lines
Quoted 2 lines · Alexander Kuleshov

---

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.

Quoted 19 lines
 builtin/show-branch.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
builtin/show-branch.c +4 -1
index 270e39c..2e60107 100644
@@ -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
 };
Signature · 2 lines
_________________________
0xAX