Skip to content

Commit 5af8b61

Browse files
avargitster
authored andcommitted
doc txt & -h consistency: word-wrap
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent acf7828 commit 5af8b61

File tree

12 files changed

+29
-16
lines changed

12 files changed

+29
-16
lines changed

Documentation/git-hash-object.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ git-hash-object - Compute object ID and optionally creates a blob from a file
99
SYNOPSIS
1010
--------
1111
[verse]
12-
'git hash-object' [-t <type>] [-w] [--path=<file>|--no-filters] [--stdin [--literally]] [--] <file>...
12+
'git hash-object' [-t <type>] [-w] [--path=<file>|--no-filters]
13+
[--stdin [--literally]] [--] <file>...
1314
'git hash-object' [-t <type>] [-w] --stdin-paths [--no-filters]
1415

1516
DESCRIPTION

Documentation/git-worktree.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ git-worktree - Manage multiple working trees
99
SYNOPSIS
1010
--------
1111
[verse]
12-
'git worktree add' [-f] [--detach] [--checkout] [--lock [--reason <string>]] [-b <new-branch>] <path> [<commit-ish>]
12+
'git worktree add' [-f] [--detach] [--checkout] [--lock [--reason <string>]]
13+
[-b <new-branch>] <path> [<commit-ish>]
1314
'git worktree list' [-v | --porcelain [-z]]
1415
'git worktree lock' [--reason <string>] <worktree>
1516
'git worktree move' <worktree> <new-path>

builtin/bugreport.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ static void get_populated_hooks(struct strbuf *hook_info, int nongit)
6060
}
6161

6262
static const char * const bugreport_usage[] = {
63-
N_("git bugreport [-o|--output-directory <file>] [-s|--suffix <format>] [--diagnose[=<mode>]"),
63+
N_("git bugreport [-o|--output-directory <file>] [-s|--suffix <format>]\n"
64+
" [--diagnose[=<mode>]"),
6465
NULL
6566
};
6667

builtin/commit-graph.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
N_("git commit-graph verify [--object-dir <objdir>] [--shallow] [--[no-]progress]")
1414

1515
#define BUILTIN_COMMIT_GRAPH_WRITE_USAGE \
16-
N_("git commit-graph write [--object-dir <objdir>] [--append] " \
17-
"[--split[=<strategy>]] [--reachable|--stdin-packs|--stdin-commits] " \
18-
"[--changed-paths] [--[no-]max-new-filters <n>] [--[no-]progress] " \
19-
"<split options>")
16+
N_("git commit-graph write [--object-dir <objdir>] [--append]\n" \
17+
" [--split[=<strategy>]] [--reachable|--stdin-packs|--stdin-commits]\n" \
18+
" [--changed-paths] [--[no-]max-new-filters <n>] [--[no-]progress]\n" \
19+
" <split options>")
2020

2121
static const char * builtin_commit_graph_verify_usage[] = {
2222
BUILTIN_COMMIT_GRAPH_VERIFY_USAGE,

builtin/commit-tree.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
#include "parse-options.h"
1616

1717
static const char * const commit_tree_usage[] = {
18-
N_("git commit-tree [(-p <parent>)...] [-S[<keyid>]] [(-m <message>)...] "
19-
"[(-F <file>)...] <tree>"),
18+
N_("git commit-tree [(-p <parent>)...] [-S[<keyid>]] [(-m <message>)...]\n"
19+
" [(-F <file>)...] <tree>"),
2020
NULL
2121
};
2222

builtin/diagnose.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
#include "diagnose.h"
44

55
static const char * const diagnose_usage[] = {
6-
N_("git diagnose [-o|--output-directory <path>] [-s|--suffix <format>] [--mode=<mode>]"),
6+
N_("git diagnose [-o|--output-directory <path>] [-s|--suffix <format>]\n"
7+
" [--mode=<mode>]"),
78
NULL
89
};
910

builtin/hash-object.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ static void hash_stdin_paths(const char *type, int no_filters, unsigned flags,
8080
int cmd_hash_object(int argc, const char **argv, const char *prefix)
8181
{
8282
static const char * const hash_object_usage[] = {
83-
N_("git hash-object [-t <type>] [-w] [--path=<file> | --no-filters] [--stdin] [--] <file>..."),
83+
N_("git hash-object [-t <type>] [-w] [--path=<file> | --no-filters]\n"
84+
" [--stdin] [--] <file>..."),
8485
"git hash-object --stdin-paths",
8586
NULL
8687
};

builtin/init-db.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,8 @@ static int shared_callback(const struct option *opt, const char *arg, int unset)
515515
}
516516

517517
static const char *const init_db_usage[] = {
518-
N_("git init [-q | --quiet] [--bare] [--template=<template-directory>] [--shared[=<permissions>]] [<directory>]"),
518+
N_("git init [-q | --quiet] [--bare] [--template=<template-directory>]\n"
519+
" [--shared[=<permissions>]] [<directory>]"),
519520
NULL
520521
};
521522

builtin/interpret-trailers.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
#include "config.h"
1414

1515
static const char * const git_interpret_trailers_usage[] = {
16-
N_("git interpret-trailers [--in-place] [--trim-empty] [(--trailer <token>[(=|:)<value>])...] [<file>...]"),
16+
N_("git interpret-trailers [--in-place] [--trim-empty]\n"
17+
" [(--trailer <token>[(=|:)<value>])...]\n"
18+
" [<file>...]"),
1719
NULL
1820
};
1921

builtin/read-tree.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ static int list_tree(struct object_id *oid)
3838
}
3939

4040
static const char * const read_tree_usage[] = {
41-
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>]])"),
41+
N_("git read-tree [(-m [--trivial] [--aggressive] | --reset | --prefix=<prefix>)\n"
42+
" [-u | -i]] [--no-sparse-checkout] [--index-output=<file>]\n"
43+
" (--empty | <tree-ish1> [<tree-ish2> [<tree-ish3>]])"),
4244
NULL
4345
};
4446

0 commit comments

Comments
 (0)