X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=Documentation%2Fpublic-inbox-fetch.pod;h=c78ffc0bc13769f418c0a512c248fc1097dd62a3;hb=7ffa98cbbf5bff8225fdfedb0f2b7c2beb5d0a6f;hp=7944fdcdcace3876ba935c22fc909d3f4f7eb0d6;hpb=b45a1dffa647f6427d0c900fcc55753db7a1994c;p=public-inbox.git diff --git a/Documentation/public-inbox-fetch.pod b/Documentation/public-inbox-fetch.pod index 7944fdcd..c78ffc0b 100644 --- a/Documentation/public-inbox-fetch.pod +++ b/Documentation/public-inbox-fetch.pod @@ -4,7 +4,7 @@ public-inbox-fetch - "git fetch" wrapper for v2 inbox mirrors =head1 SYNOPSIS -public-inbox-fetch -C INBOX_DIR +public-inbox-fetch [--exit-code] -C INBOX_DIR =head1 DESCRIPTION @@ -19,7 +19,19 @@ It does not run L, making it suitable for maintaining git-only backups. For v2 inboxes, it will maintain C<$INBOX_DIR/manifest.js.gz> -file to speed up future invocations. +file to speed up future invocations. It always safe to remove +manifest.js.gz, it is merely an optimization and will be +restored on the next invocation. + +To prevent fetches on any v2 epoch, use L to remove +write permissions to the top-level of the epoch. For example, +to disable fetches on epoch 4: + + chmod a-w $INBOX_DIR/git/4.git + +If you wish to re-enable fetches to the epoch: + + chmod u+w $INBOX_DIR/git/4.git =head1 OPTIONS @@ -31,6 +43,24 @@ file to speed up future invocations. Quiets down progress messages, also passed to L. +=item -T REMOTE + +=item --try-remote REMOTE + +Try a given remote name instead of C or C<_grokmirror>. +May be specified more than once. + +Default: C, C<_grokmirror> + +=item --exit-code + +Exit with C<127> if no updates are done. This can be used in +shell scripts to avoid invoking L when +there are no updates: + + public-inbox-fetch -q --exit-code && public-inbox-index + test $? -eq 0 || exit $? + =item -v =item --verbose @@ -41,10 +71,27 @@ Increases verbosity, also passed to L. =item --no-torsocks -Whether to wrap L and L commands with torsocks. +Whether to wrap L and L commands with L. Default: C +=back + +=head1 EXIT CODES + +=over + +=item 127 + +no updates when L is used above + +=back + +public-inbox-fetch will also exit with curl L +as documented in the L manpage (e.g. C<7> when curl cannot +reach a host). Likewise, L failures are also +propagated to the user. + =head1 CONTACT Feedback welcome via plain-text mail to L @@ -60,4 +107,4 @@ License: AGPL-3.0+ L =head1 SEE ALSO -L +L, L