diff options
| author | Roger Shimizu <rosh@debian.org> | 2021-06-20 21:41:05 +0900 |
|---|---|---|
| committer | Mike Frysinger <vapier@google.com> | 2021-07-16 20:11:41 +0000 |
| commit | 0a1f533e2835c856473e3e4046341a4d2f66764b (patch) | |
| tree | 0902c039b76525f1c6785cec561df46265fdb787 /man/repo-forall.1 | |
| parent | 927d29a8afa26a3f1aec841f2150c65e3931ef9b (diff) | |
| download | git-repo-0a1f533e2835c856473e3e4046341a4d2f66764b.tar.gz | |
Add script 'release/update-manpages' to generate manpages
Debian package started to ship manpages for repo since 2.8 [1]
And it's about for one year. So I think it should be upstreamed.
The script depends on help2man, which is available in both debian [2]
and ubuntu [3].
[1] https://tracker.debian.org/news/1150858/accepted-repo-28-1-source-into-unstable
[2] https://tracker.debian.org/pkg/help2man
[3] https://launchpad.net/ubuntu/+source/help2man
Change-Id: Ide2b356d0944ebde34cc96c6d5a782655bd72288
Signed-off-by: Roger Shimizu <rosh@debian.org>
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/309782
Reviewed-by: Mike Frysinger <vapier@google.com>
Diffstat (limited to 'man/repo-forall.1')
| -rw-r--r-- | man/repo-forall.1 | 127 |
1 files changed, 127 insertions, 0 deletions
diff --git a/man/repo-forall.1 b/man/repo-forall.1 new file mode 100644 index 00000000..194f4d20 --- /dev/null +++ b/man/repo-forall.1 | |||
| @@ -0,0 +1,127 @@ | |||
| 1 | .\" DO NOT MODIFY THIS FILE! It was generated by help2man. | ||
| 2 | .TH REPO "1" "July 2021" "repo forall" "Repo Manual" | ||
| 3 | .SH NAME | ||
| 4 | repo \- repo forall - manual page for repo forall | ||
| 5 | .SH SYNOPSIS | ||
| 6 | .B repo | ||
| 7 | \fI\,forall \/\fR[\fI\,<project>\/\fR...] \fI\,-c <command> \/\fR[\fI\,<arg>\/\fR...] | ||
| 8 | .SH DESCRIPTION | ||
| 9 | Summary | ||
| 10 | .PP | ||
| 11 | Run a shell command in each project | ||
| 12 | .PP | ||
| 13 | repo forall \fB\-r\fR str1 [str2] ... \fB\-c\fR <command> [<arg>...] | ||
| 14 | .SH OPTIONS | ||
| 15 | .TP | ||
| 16 | \fB\-h\fR, \fB\-\-help\fR | ||
| 17 | show this help message and exit | ||
| 18 | .TP | ||
| 19 | \fB\-j\fR JOBS, \fB\-\-jobs\fR=\fI\,JOBS\/\fR | ||
| 20 | number of jobs to run in parallel (default: 4) | ||
| 21 | .TP | ||
| 22 | \fB\-r\fR, \fB\-\-regex\fR | ||
| 23 | execute the command only on projects matching regex or | ||
| 24 | wildcard expression | ||
| 25 | .TP | ||
| 26 | \fB\-i\fR, \fB\-\-inverse\-regex\fR | ||
| 27 | execute the command only on projects not matching | ||
| 28 | regex or wildcard expression | ||
| 29 | .TP | ||
| 30 | \fB\-g\fR GROUPS, \fB\-\-groups\fR=\fI\,GROUPS\/\fR | ||
| 31 | execute the command only on projects matching the | ||
| 32 | specified groups | ||
| 33 | .TP | ||
| 34 | \fB\-c\fR, \fB\-\-command\fR | ||
| 35 | command (and arguments) to execute | ||
| 36 | .TP | ||
| 37 | \fB\-e\fR, \fB\-\-abort\-on\-errors\fR | ||
| 38 | abort if a command exits unsuccessfully | ||
| 39 | .TP | ||
| 40 | \fB\-\-ignore\-missing\fR | ||
| 41 | silently skip & do not exit non\-zero due missing | ||
| 42 | checkouts | ||
| 43 | .TP | ||
| 44 | \fB\-\-interactive\fR | ||
| 45 | force interactive usage | ||
| 46 | .SS Logging options: | ||
| 47 | .TP | ||
| 48 | \fB\-v\fR, \fB\-\-verbose\fR | ||
| 49 | show all output | ||
| 50 | .TP | ||
| 51 | \fB\-q\fR, \fB\-\-quiet\fR | ||
| 52 | only show errors | ||
| 53 | .TP | ||
| 54 | \fB\-p\fR | ||
| 55 | show project headers before output | ||
| 56 | .PP | ||
| 57 | Run `repo help forall` to view the detailed manual. | ||
| 58 | .SH DETAILS | ||
| 59 | .PP | ||
| 60 | Executes the same shell command in each project. | ||
| 61 | .PP | ||
| 62 | The \fB\-r\fR option allows running the command only on projects matching regex or | ||
| 63 | wildcard expression. | ||
| 64 | .PP | ||
| 65 | By default, projects are processed non\-interactively in parallel. If you want to | ||
| 66 | run interactive commands, make sure to pass \fB\-\-interactive\fR to force \fB\-\-jobs\fR 1. | ||
| 67 | While the processing order of projects is not guaranteed, the order of project | ||
| 68 | output is stable. | ||
| 69 | .PP | ||
| 70 | Output Formatting | ||
| 71 | .PP | ||
| 72 | The \fB\-p\fR option causes 'repo forall' to bind pipes to the command's stdin, stdout | ||
| 73 | and stderr streams, and pipe all output into a continuous stream that is | ||
| 74 | displayed in a single pager session. Project headings are inserted before the | ||
| 75 | output of each command is displayed. If the command produces no output in a | ||
| 76 | project, no heading is displayed. | ||
| 77 | .PP | ||
| 78 | The formatting convention used by \fB\-p\fR is very suitable for some types of | ||
| 79 | searching, e.g. `repo forall \fB\-p\fR \fB\-c\fR git log \fB\-SFoo\fR` will print all commits that | ||
| 80 | add or remove references to Foo. | ||
| 81 | .PP | ||
| 82 | The \fB\-v\fR option causes 'repo forall' to display stderr messages if a command | ||
| 83 | produces output only on stderr. Normally the \fB\-p\fR option causes command output to | ||
| 84 | be suppressed until the command produces at least one byte of output on stdout. | ||
| 85 | .PP | ||
| 86 | Environment | ||
| 87 | .PP | ||
| 88 | pwd is the project's working directory. If the current client is a mirror | ||
| 89 | client, then pwd is the Git repository. | ||
| 90 | .PP | ||
| 91 | REPO_PROJECT is set to the unique name of the project. | ||
| 92 | .PP | ||
| 93 | REPO_PATH is the path relative the the root of the client. | ||
| 94 | .PP | ||
| 95 | REPO_REMOTE is the name of the remote system from the manifest. | ||
| 96 | .PP | ||
| 97 | REPO_LREV is the name of the revision from the manifest, translated to a local | ||
| 98 | tracking branch. If you need to pass the manifest revision to a locally executed | ||
| 99 | git command, use REPO_LREV. | ||
| 100 | .PP | ||
| 101 | REPO_RREV is the name of the revision from the manifest, exactly as written in | ||
| 102 | the manifest. | ||
| 103 | .PP | ||
| 104 | REPO_COUNT is the total number of projects being iterated. | ||
| 105 | .PP | ||
| 106 | REPO_I is the current (1\-based) iteration count. Can be used in conjunction with | ||
| 107 | REPO_COUNT to add a simple progress indicator to your command. | ||
| 108 | .PP | ||
| 109 | REPO__* are any extra environment variables, specified by the "annotation" | ||
| 110 | element under any project element. This can be useful for differentiating trees | ||
| 111 | based on user\-specific criteria, or simply annotating tree details. | ||
| 112 | .PP | ||
| 113 | shell positional arguments ($1, $2, .., $#) are set to any arguments following | ||
| 114 | <command>. | ||
| 115 | .PP | ||
| 116 | Example: to list projects: | ||
| 117 | .IP | ||
| 118 | repo forall \fB\-c\fR 'echo $REPO_PROJECT' | ||
| 119 | .PP | ||
| 120 | Notice that $REPO_PROJECT is quoted to ensure it is expanded in the context of | ||
| 121 | running <command> instead of in the calling shell. | ||
| 122 | .PP | ||
| 123 | Unless \fB\-p\fR is used, stdin, stdout, stderr are inherited from the terminal and are | ||
| 124 | not redirected. | ||
| 125 | .PP | ||
| 126 | If \fB\-e\fR is used, when a command exits unsuccessfully, 'repo forall' will abort | ||
| 127 | without iterating through the remaining projects. | ||
