summaryrefslogtreecommitdiff
path: root/builtin/ls-remote.c
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2021-09-13 00:13:19 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-09-13 01:57:30 (GMT)
commit5d70198efedcbb2bf626a5d007d8080cd342cb6e (patch)
treebc14730129d6f8045068750dc7de7ad413a490ad /builtin/ls-remote.c
parent8b7c11b8668b4e774f81a9f0b4c30144b818f1d1 (diff)
downloadgit-5d70198efedcbb2bf626a5d007d8080cd342cb6e.zip
git-5d70198efedcbb2bf626a5d007d8080cd342cb6e.tar.gz
git-5d70198efedcbb2bf626a5d007d8080cd342cb6e.tar.bz2
parse-options API users: align usage output in C-strings
In preparation for having continued usage lines properly aligned in "git <cmd> -h" output, let's have the "[" on the second such lines align with the "[" on the first line. In some cases this makes the output worse, because e.g. the "git ls-remote -h" output had been aligned to account for the extra whitespace that the usage_with_options_internal() function in parse-options.c would add. In other cases such as builtin/stash.c (not changed here), we were aligned in the C strings, but since that didn't account for the extra padding in usage_with_options_internal() it would come out looking misaligned, e.g. code like this: N_("git stash [push [-p|--patch] [-k|--[no-]keep-index] [-q|--quiet]\n" " [-u|--include-untracked] [-a|--all] [-m|--message <message>]\n" Would emit: or: git stash [push [-p|--patch] [-k|--[no-]keep-index] [-q|--quiet] [-u|--include-untracked] [-a|--all] [-m|--message <message>] Let's change all the usage arrays which use such continued usage output via "\n"-embedding to be like builtin/stash.c. This makes the output worse temporarily, but in a subsequent change I'll improve the usage_with_options_internal() to take this into account, at which point all of the strings being changed here will emit prettier output. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/ls-remote.c')
-rw-r--r--builtin/ls-remote.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/ls-remote.c b/builtin/ls-remote.c
index f4fd823..318949c 100644
--- a/builtin/ls-remote.c
+++ b/builtin/ls-remote.c
@@ -7,8 +7,8 @@
static const char * const ls_remote_usage[] = {
N_("git ls-remote [--heads] [--tags] [--refs] [--upload-pack=<exec>]\n"
- " [-q | --quiet] [--exit-code] [--get-url]\n"
- " [--symref] [<repository> [<refs>...]]"),
+ " [-q | --quiet] [--exit-code] [--get-url]\n"
+ " [--symref] [<repository> [<refs>...]]"),
NULL
};