Skip to content

Commit 86d785f

Browse files
committed
mgitstatus(1) man page.
Source is markdown, which is converted into a man page with pandoc. See the 'man' target in the build.sla file.
1 parent 9d1b97e commit 86d785f

3 files changed

Lines changed: 245 additions & 0 deletions

File tree

build.sla

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,8 @@ test () {
1414
# But we need to or colors won't work
1515
shellcheck -e $IGNORE mgitstatus
1616
}
17+
18+
man () {
19+
# Build the man page from markdown source
20+
pandoc ./mgitstatus.1.md -s -t man > mgitstatus.1
21+
}

mgitstatus.1

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
.\" Automatically generated by Pandoc 1.19.2.4
2+
.\"
3+
.TH "MGITSTATUS" "1" "Jul 2019" "" ""
4+
.hy
5+
.SH NAME
6+
.PP
7+
mgitstatus \[en] Show uncommitted, untracked and unpushed changes for
8+
multiple Git repos.
9+
.SH SYNOPSIS
10+
.PP
11+
\f[B]mgitstatus\f[] [\f[B]\-\-version\f[]] [\f[B]\-w\f[]] [\f[B]\-e\f[]]
12+
[\f[B]\-f\f[]] [\f[B]\-\-no\-X\f[]] [\f[B]DIR\f[]] [\f[B]DEPTH=2\f[]]
13+
.SH DESCRIPTION
14+
.PP
15+
\f[B]mgitstatus\f[] shows uncommited, untracked and unpushed changes in
16+
multiple Git repositories.
17+
mgitstatus shows:
18+
.IP \[bu] 2
19+
\f[B]Uncommitted changes\f[] if there are unstaged or uncommitted
20+
changes on the checked out branch.
21+
.IP \[bu] 2
22+
\f[B]Untracked files\f[] if there are untracked files which are not
23+
ignored.
24+
.IP \[bu] 2
25+
\f[B]Needs push (BRANCH)\f[] if the branch is tracking a (remote) branch
26+
which is behind.
27+
.IP \[bu] 2
28+
\f[B]Needs upstream (BRANCH)\f[] if a branch does not have a local or
29+
remote upstream branch configured.
30+
Changes in the branch may otherwise never be pushed or merged.
31+
.IP \[bu] 2
32+
\f[B]Needs pull (BRANCH)\f[] if the branch is tracking a (remote) branch
33+
which is ahead.
34+
This requires that the local git repo already knows about the remote
35+
changes (i.e.
36+
you\[aq]ve done a fetch), or that you specify the \-f option.
37+
mgitstatus does NOT contact the remote by default.
38+
.IP \[bu] 2
39+
\f[B]X stashes\f[] if there are stashes.
40+
.PP
41+
Since there are a lot of different states a git repository can be in,
42+
mgitstatus makes no guarantees that all states are taken into account.
43+
.SH OPTIONS
44+
.TP
45+
.B \f[B]\-\-version\f[]
46+
Show version
47+
.RS
48+
.RE
49+
.TP
50+
.B \f[B]\-w\f[]
51+
Warn about dirs that are not Git repositories
52+
.RS
53+
.RE
54+
.TP
55+
.B \f[B]\-e\f[]
56+
Exclude repos that are \[aq]ok\[aq]
57+
.RS
58+
.RE
59+
.TP
60+
.B \f[B]\-f\f[]
61+
Do a \[aq]git fetch\[aq] on each repo (slow for many repos)
62+
.RS
63+
.RE
64+
.TP
65+
.B \f[B]\-c\f[]
66+
Force color output (preserve colors when using pipes)
67+
.RS
68+
.RE
69+
.PP
70+
You can limit output with the following options:
71+
.TP
72+
.B \f[B]\-\-no\-push\f[]
73+
Do not show branches that need a push.
74+
.RS
75+
.RE
76+
.TP
77+
.B \f[B]\-\-no\-pull\f[]
78+
Do not show branches that need a pull.
79+
.RS
80+
.RE
81+
.TP
82+
.B \f[B]\-\-no\-upstream\f[]
83+
Do not show branches that need an upstream.
84+
.RS
85+
.RE
86+
.TP
87+
.B \f[B]\-\-no\-uncommited\f[]
88+
Do not show branches that have unstaged or uncommitted changes.
89+
.RS
90+
.RE
91+
.TP
92+
.B \f[B]\-\-no\-untracked\f[]
93+
Do not show branches that have untracked files.
94+
.RS
95+
.RE
96+
.TP
97+
.B \f[B]\-\-no\-stashes\f[]
98+
Do now show stashes
99+
.RS
100+
.RE
101+
.SH EXAMPLES
102+
.PP
103+
The following command scans two directories deep for Git projects and
104+
shows their status:
105+
.IP
106+
.nf
107+
\f[C]
108+
$\ mgitstatus\
109+
\&./fboender/sla:\ ok\
110+
\&./fboender/multi\-git\-status:\ Needs\ push\ (master)\ Untracked\ files
111+
\&./other/peewee:\ ok\
112+
\f[]
113+
.fi
114+
.PP
115+
To scan deeper (three dirs instead of two):
116+
.IP
117+
.nf
118+
\f[C]
119+
$\ mgitstatus\ 3
120+
\f[]
121+
.fi
122+
.PP
123+
The following command scans three levels deep in \f[C]/opt/deploy/\f[]
124+
and hides repos that are \[aq]ok\[aq].
125+
It does not show stashes:
126+
.IP
127+
.nf
128+
\f[C]
129+
$\ mgitstatus\ \-e\ \-\-no\-stashes\ 3\ /opt/deploy
130+
\f[]
131+
.fi
132+
.SH COPYRIGHT
133+
.PP
134+
Copyright 2016\-2019, Ferry Boender.
135+
.PP
136+
Licensed under the MIT license.
137+
For more information, see the LICENSE.txt file.
138+
.SH AUTHORS
139+
Ferry Boender.

mgitstatus.1.md

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
% MGITSTATUS(1)
2+
% Ferry Boender
3+
% Jul 2019
4+
5+
# NAME
6+
7+
mgitstatus – Show uncommitted, untracked and unpushed changes for multiple Git repos.
8+
9+
# SYNOPSIS
10+
11+
**mgitstatus** [**--version**] [**-w**] [**-e**] [**-f**] [**--no-X**] [**DIR**] [**DEPTH=2**]
12+
13+
# DESCRIPTION
14+
15+
**mgitstatus** shows uncommited, untracked and unpushed changes in multiple
16+
Git repositories. mgitstatus shows:
17+
18+
- **Uncommitted changes** if there are unstaged or uncommitted changes on the
19+
checked out branch.
20+
21+
- **Untracked files** if there are untracked files which are not ignored.
22+
23+
- **Needs push (BRANCH)** if the branch is tracking a (remote) branch which is
24+
behind.
25+
26+
- **Needs upstream (BRANCH)** if a branch does not have a local or remote
27+
upstream branch configured. Changes in the branch may otherwise never be
28+
pushed or merged.
29+
30+
- **Needs pull (BRANCH)** if the branch is tracking a (remote) branch which is
31+
ahead. This requires that the local git repo already knows about the remote
32+
changes (i.e. you've done a fetch), or that you specify the -f option.
33+
mgitstatus does NOT contact the remote by default.
34+
35+
- **X stashes** if there are stashes.
36+
37+
Since there are a lot of different states a git repository can be in,
38+
mgitstatus makes no guarantees that all states are taken into account.
39+
40+
# OPTIONS
41+
42+
**--version**
43+
: Show version
44+
45+
**-w**
46+
: Warn about dirs that are not Git repositories
47+
48+
**-e**
49+
: Exclude repos that are 'ok'
50+
51+
**-f**
52+
: Do a 'git fetch' on each repo (slow for many repos)
53+
54+
**-c**
55+
: Force color output (preserve colors when using pipes)
56+
57+
You can limit output with the following options:
58+
59+
**--no-push**
60+
: Do not show branches that need a push.
61+
62+
**--no-pull**
63+
: Do not show branches that need a pull.
64+
65+
**--no-upstream**
66+
: Do not show branches that need an upstream.
67+
68+
**--no-uncommited**
69+
: Do not show branches that have unstaged or uncommitted changes.
70+
71+
**--no-untracked**
72+
: Do not show branches that have untracked files.
73+
74+
**--no-stashes**
75+
: Do now show stashes
76+
77+
78+
# EXAMPLES
79+
80+
The following command scans two directories deep for Git projects and shows
81+
their status:
82+
83+
$ mgitstatus
84+
./fboender/sla: ok
85+
./fboender/multi-git-status: Needs push (master) Untracked files
86+
./other/peewee: ok
87+
88+
To scan deeper (three dirs instead of two):
89+
90+
$ mgitstatus 3
91+
92+
The following command scans three levels deep in `/opt/deploy/` and hides
93+
repos that are 'ok'. It does not show stashes:
94+
95+
$ mgitstatus -e --no-stashes 3 /opt/deploy
96+
97+
# COPYRIGHT
98+
99+
Copyright 2016-2019, Ferry Boender.
100+
101+
Licensed under the MIT license. For more information, see the LICENSE.txt file.

0 commit comments

Comments
 (0)