PUBLIC-INBOX-FETCH(1)

πŸ’… public-inbox-fetch β€” the <rainbow>git fetch</rainbow> wrapper for v2 inbox mirrors

okay bestie, sit down, hydrate, because this one is so good. this is public-inbox-fetch from the public-inbox user manual, and she is lowkey the most chill little script in the whole family. she's a git fetch wrapper for v2 inbox mirrors. that's it. that's the vibe. ✨


🌸 SYNOPSIS 🌸

public-inbox-fetch [--exit-code] -C INBOX_DIR

πŸ¦‹ DESCRIPTION πŸ¦‹

So what does she actually do. public-inbox-fetch updates the git storage of public-inbox mirrors. that's the whole job. 🫢

And here's the iconic part: with v2 inboxes, she lets you detect new epochs and she avoids doing unnecessary traffic on the old epochs. like, she's not gonna drag the whole thing when only one epoch changed. main character energy, fr fr. πŸ‘‘

Bestie, she is so low-maintenance: public-inbox-fetch does not use and does not require any configuration files of its own. none. zero. she just shows up and works. πŸ’–

She also does not run public-inbox-index(1), which is exactly why she's perfect for maintaining git-only backups. no indexing, no extra steps, just git. slay. πŸ’…

For v2 inboxes, she will maintain the "$INBOX_DIR/manifest.js.gz" file to speed up future invocations. and before you panic β€” it is always safe to remove manifest.js.gz. it is merely an optimization, and it will be restored on the next invocation. so delete it, don't delete it, she doesn't care, she's got you. 🧚

Now, the ✨ power move ✨: if you want to prevent fetches on any v2 epoch, use chmod(1) 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

and if you wish to re-enable fetches to the epoch:

chmod u+w $INBOX_DIR/git/4.git

not me gatekeeping an epoch with file permissions. it's giving boundaries. πŸŽ€


✨ OPTIONS ✨

  • -q, --quiet β€” quiets down progress messages, and it's also passed to git-fetch(1). shhh. 🀫
  • -T REMOTE, --try-remote REMOTE β€” try a given remote name instead of "origin" or "_grokmirror". may be specified more than once, so go off, list as many as you want.
    • Default: "origin", "_grokmirror"
  • --exit-code β€” exit with 127 if no updates are done. this is the one you use in shell scripts to avoid invoking public-inbox-index(1) when there are no updates:
public-inbox-fetch -q --exit-code && public-inbox-index
test $? -eq 0 || exit $?

look at that. conditional indexing. we love a lazy-but-correct pipeline. πŸ”₯

  • -p, --prune β€” passes the "--prune" and "--prune-tags" flags to git-fetch(1) calls.
    • this is a new option in public-inbox 2.0+ πŸ†•
  • -v, --verbose β€” increases verbosity, also passed to git-fetch(1). she's yapping now and honestly? valid. πŸ’¬
  • --torsocks=auto|no|yes, --no-torsocks β€” whether to wrap git(1) and curl(1) commands with torsocks(1).
    • Default: "auto"

πŸ’€ EXIT CODES πŸ’€

  • 127 β€” no updates, when "--exit-code" is used above. (yes that's the whole point of it, she's telling you "nothing happened bestie, don't bother indexing")
  • public-inbox-fetch will also exit with curl "EXIT CODES" in curl(1) as documented in the curl(1) manpage (e.g. 7 when curl cannot reach a host). Likewise, git-fetch(1) failures are also propagated to the user. so if something's broken, you will hear about it. no silent suffering here. 😭

πŸ’Œ CONTACT πŸ’Œ

Feedback welcome via plain-text mail to <mailto:meta@public-inbox.org>

The mail archives are hosted at <https://public-inbox.org/meta/> and <http://4uok3hntl7oi7b4uf4rtfwefqeexfzil2w6kgk2jn5z2f764irre7byd.onion/meta/>

(plain-text mail, bestie. not html. the archive has taste.) 🌈


Copyright all contributors <mailto:meta@public-inbox.org>

License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>


πŸ“ SEE ALSO πŸ“


and that's the whole page, iykyk. this one shipped out of public-inbox.git and the date on it is 1993-10-02, which is honestly iconic of her. go forth and fetch, bestie. no cap. πŸ’œπŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from