]> git.ipfire.org Git - thirdparty/git.git/commitdiff
doc txt & -h consistency: word-wrap
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Thu, 13 Oct 2022 15:39:02 +0000 (17:39 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 13 Oct 2022 16:32:55 +0000 (09:32 -0700)
Change the documentation and -h output for those built-in commands
where both the -h output and *.txt were lacking in word-wrapping.

There are many more built-ins that could use this treatment, this
change is narrowed to those where this whitespace change is needed to
make the -h and *.txt consistent in the end.

In the case of "Documentation/git-hash-object.txt" and
"builtin/hash-object.c" this is not a "doc txt & -h consistency"
change, as we're changing both versions, doing so here makes a
subsequent change smaller.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 files changed:
Documentation/git-hash-object.txt
Documentation/git-worktree.txt
builtin/bugreport.c
builtin/commit-graph.c
builtin/commit-tree.c
builtin/diagnose.c
builtin/hash-object.c
builtin/init-db.c
builtin/interpret-trailers.c
builtin/read-tree.c
builtin/show-branch.c
builtin/show-ref.c

index df9e2c58bdbc5f31edaf25577df744868e16f3de..58670ef12f72f9cfbf0aa2a6774d03382f57590e 100644 (file)
@@ -9,7 +9,8 @@ git-hash-object - Compute object ID and optionally creates a blob from a file
 SYNOPSIS
 --------
 [verse]
-'git hash-object' [-t <type>] [-w] [--path=<file>|--no-filters] [--stdin [--literally]] [--] <file>...
+'git hash-object' [-t <type>] [-w] [--path=<file>|--no-filters]
+               [--stdin [--literally]] [--] <file>...
 'git hash-object' [-t <type>] [-w] --stdin-paths [--no-filters]
 
 DESCRIPTION
index ada30c86a7c2139cccd1315370dc2f63c4472e26..063d6eeb99dd34c4b08f3c3dde9340146ce48756 100644 (file)
@@ -9,7 +9,8 @@ git-worktree - Manage multiple working trees
 SYNOPSIS
 --------
 [verse]
-'git worktree add' [-f] [--detach] [--checkout] [--lock [--reason <string>]] [-b <new-branch>] <path> [<commit-ish>]
+'git worktree add' [-f] [--detach] [--checkout] [--lock [--reason <string>]]
+                  [-b <new-branch>] <path> [<commit-ish>]
 'git worktree list' [-v | --porcelain [-z]]
 'git worktree lock' [--reason <string>] <worktree>
 'git worktree move' <worktree> <new-path>
index 530895be55fe6d9627c5d954f4c235d22769051e..faa268f3cfb1f2733ea377d034615d8542a8b320 100644 (file)
@@ -60,7 +60,8 @@ static void get_populated_hooks(struct strbuf *hook_info, int nongit)
 }
 
 static const char * const bugreport_usage[] = {
-       N_("git bugreport [-o|--output-directory <file>] [-s|--suffix <format>] [--diagnose[=<mode>]"),
+       N_("git bugreport [-o|--output-directory <file>] [-s|--suffix <format>]\n"
+          "              [--diagnose[=<mode>]"),
        NULL
 };
 
index dc3cc35394781282f136e3bf4999a9b0807d2e18..50b1a171566fed6f026c202cbe08dd547f82f09f 100644 (file)
        N_("git commit-graph verify [--object-dir <objdir>] [--shallow] [--[no-]progress]")
 
 #define BUILTIN_COMMIT_GRAPH_WRITE_USAGE \
-       N_("git commit-graph write [--object-dir <objdir>] [--append] " \
-          "[--split[=<strategy>]] [--reachable|--stdin-packs|--stdin-commits] " \
-          "[--changed-paths] [--[no-]max-new-filters <n>] [--[no-]progress] " \
-          "<split options>")
+       N_("git commit-graph write [--object-dir <objdir>] [--append]\n" \
+          "                       [--split[=<strategy>]] [--reachable|--stdin-packs|--stdin-commits]\n" \
+          "                       [--changed-paths] [--[no-]max-new-filters <n>] [--[no-]progress]\n" \
+          "                       <split options>")
 
 static const char * builtin_commit_graph_verify_usage[] = {
        BUILTIN_COMMIT_GRAPH_VERIFY_USAGE,
index 63ea3229333c8766d51c34be9aec3f4d1bab3cd9..e4b85d29d56bd6426710f1404e648ddfc6418b25 100644 (file)
@@ -15,8 +15,8 @@
 #include "parse-options.h"
 
 static const char * const commit_tree_usage[] = {
-       N_("git commit-tree [(-p <parent>)...] [-S[<keyid>]] [(-m <message>)...] "
-               "[(-F <file>)...] <tree>"),
+       N_("git commit-tree [(-p <parent>)...] [-S[<keyid>]] [(-m <message>)...]\n"
+          "                [(-F <file>)...] <tree>"),
        NULL
 };
 
index cd260c20155e27ca53dbade2dc0cec284b1b720f..c7672fa99e20910d6ccb67542783c27d28fb728a 100644 (file)
@@ -3,7 +3,8 @@
 #include "diagnose.h"
 
 static const char * const diagnose_usage[] = {
-       N_("git diagnose [-o|--output-directory <path>] [-s|--suffix <format>] [--mode=<mode>]"),
+       N_("git diagnose [-o|--output-directory <path>] [-s|--suffix <format>]\n"
+          "             [--mode=<mode>]"),
        NULL
 };
 
index fbae878c2b951599fcfb82021185c67cc942b5ca..f7c16802f0c26bb0a11d52a5f8299f120a3fda34 100644 (file)
@@ -80,7 +80,8 @@ static void hash_stdin_paths(const char *type, int no_filters, unsigned flags,
 int cmd_hash_object(int argc, const char **argv, const char *prefix)
 {
        static const char * const hash_object_usage[] = {
-               N_("git hash-object [-t <type>] [-w] [--path=<file> | --no-filters] [--stdin] [--] <file>..."),
+               N_("git hash-object [-t <type>] [-w] [--path=<file> | --no-filters]\n"
+                  "                [--stdin] [--] <file>..."),
                "git hash-object  --stdin-paths",
                NULL
        };
index 546f9c595e7d8c04127d3d1a3216be4673d7e6c9..08ba006d55ec176e6bfc98f667b2ab78e1cdc3e5 100644 (file)
@@ -515,7 +515,8 @@ static int shared_callback(const struct option *opt, const char *arg, int unset)
 }
 
 static const char *const init_db_usage[] = {
-       N_("git init [-q | --quiet] [--bare] [--template=<template-directory>] [--shared[=<permissions>]] [<directory>]"),
+       N_("git init [-q | --quiet] [--bare] [--template=<template-directory>]\n"
+          "         [--shared[=<permissions>]] [<directory>]"),
        NULL
 };
 
index 84748eafc01bf148dfe161161f918212cd577cee..4cf0cf265dcaf9d6958b8d6fe52ec86162ff9f7c 100644 (file)
@@ -13,7 +13,9 @@
 #include "config.h"
 
 static const char * const git_interpret_trailers_usage[] = {
-       N_("git interpret-trailers [--in-place] [--trim-empty] [(--trailer <token>[(=|:)<value>])...] [<file>...]"),
+       N_("git interpret-trailers [--in-place] [--trim-empty]\n"
+          "                       [(--trailer <token>[(=|:)<value>])...]\n"
+          "                       [<file>...]"),
        NULL
 };
 
index 9f1f33e95466a4b2ff4f99a3b5e95878e40c6d38..b3a389e1b1f88e0c4fea52c408310074325b1264 100644 (file)
@@ -38,7 +38,9 @@ static int list_tree(struct object_id *oid)
 }
 
 static const char * const read_tree_usage[] = {
-       N_("git read-tree [(-m [--trivial] [--aggressive] | --reset | --prefix=<prefix>) [-u | -i]] [--no-sparse-checkout] [--index-output=<file>] (--empty | <tree-ish1> [<tree-ish2> [<tree-ish3>]])"),
+       N_("git read-tree [(-m [--trivial] [--aggressive] | --reset | --prefix=<prefix>)\n"
+          "              [-u | -i]] [--no-sparse-checkout] [--index-output=<file>]\n"
+          "              (--empty | <tree-ish1> [<tree-ish2> [<tree-ish3>]])"),
        NULL
 };
 
index 64c649c6a238605cb847bbf515cbdca58cde990c..6db13de8910b016b65ed39e675beec4934910356 100644 (file)
@@ -14,7 +14,8 @@ static const char* show_branch_usage[] = {
     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>)...]"),
+       "                [--no-name | --sha1-name] [--topics]\n"
+       "                [(<rev> | <glob>)...]"),
     N_("git show-branch (-g | --reflog)[=<n>[,<base>]] [--list] [<ref>]"),
     NULL
 };
index 5fa207a044e0691b9f82627b074645595603c2dd..d807ef5c28b6119312d4cccd1064b61497124559 100644 (file)
@@ -9,7 +9,9 @@
 #include "parse-options.h"
 
 static const char * const show_ref_usage[] = {
-       N_("git show-ref [-q | --quiet] [--verify] [--head] [-d | --dereference] [-s | --hash[=<n>]] [--abbrev[=<n>]] [--tags] [--heads] [--] [<pattern>...]"),
+       N_("git show-ref [-q | --quiet] [--verify] [--head] [-d | --dereference]\n"
+          "             [-s | --hash[=<n>]] [--abbrev[=<n>]] [--tags]\n"
+          "             [--heads] [--] [<pattern>...]"),
        N_("git show-ref --exclude-existing[=<pattern>]"),
        NULL
 };