]> Sergey Matveev's repositories - public-inbox.git/blob - Documentation/public-inbox-fetch.pod
fetch: support --exit-code switch
[public-inbox.git] / Documentation / public-inbox-fetch.pod
1 =head1 NAME
2
3 public-inbox-fetch - "git fetch" wrapper for v2 inbox mirrors
4
5 =head1 SYNOPSIS
6
7 public-inbox-fetch [--exit-code] -C INBOX_DIR
8
9 =head1 DESCRIPTION
10
11 public-inbox-fetch updates git storage of public-inbox mirrors.
12 With v2 inboxes, it allows detection of new epochs and avoids
13 unnecessary traffic on old epochs.
14
15 public-inbox-fetch does not use nor require any configuration
16 files of its own.
17
18 It does not run L<public-inbox-index(1)>, making it suitable
19 for maintaining git-only backups.
20
21 For v2 inboxes, it will maintain C<$INBOX_DIR/manifest.js.gz>
22 file to speed up future invocations.
23
24 =head1 OPTIONS
25
26 =over
27
28 =item -q
29
30 =item --quiet
31
32 Quiets down progress messages, also passed to L<git-fetch(1)>.
33
34 =item --exit-code
35
36 Exit with C<127> if no updates are done.  This can be used in
37 shell scripts to avoid invoking L<public-inbox-index(1)> when
38 there are no updates:
39
40         public-inbox-fetch -q --exit-code && public-inbox-index
41         test $? -eq 0 || exit $?
42
43 =item -v
44
45 =item --verbose
46
47 Increases verbosity, also passed to L<git-fetch(1)>.
48
49 =item --torsocks=auto|no|yes
50
51 =item --no-torsocks
52
53 Whether to wrap L<git(1)> and L<curl(1)> commands with torsocks.
54
55 Default: C<auto>
56
57 =back
58
59 =head1 EXIT CODES
60
61 =over
62
63 =item 127
64
65 no updates when L</--exit-code> is used above
66
67 =back
68
69 public-inbox-fetch will also exit with curl L<curl(1)/EXIT CODES>
70 as documented in the L<curl(1)> manpage (e.g. C<7> when curl cannot
71 reach a host).  Likewise, L<git-fetch(1)> failures are also
72 propagated to the user.
73
74 =head1 CONTACT
75
76 Feedback welcome via plain-text mail to L<mailto:meta@public-inbox.org>
77
78 The mail archives are hosted at L<https://public-inbox.org/meta/> and
79 L<http://4uok3hntl7oi7b4uf4rtfwefqeexfzil2w6kgk2jn5z2f764irre7byd.onion/meta/>
80
81 =head1 COPYRIGHT
82
83 Copyright all contributors L<mailto:meta@public-inbox.org>
84
85 License: AGPL-3.0+ L<https://www.gnu.org/licenses/agpl-3.0.txt>
86
87 =head1 SEE ALSO
88
89 L<public-inbox-index(1)>, L<curl(1)>