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 togit-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"
- Default:
--exit-codeβ exit with 127 if no updates are done. this is the one you use in shell scripts to avoid invokingpublic-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 togit-fetch(1)calls.- this is a new option in public-inbox 2.0+ π
-v,--verboseβ increases verbosity, also passed togit-fetch(1). she's yapping now and honestly? valid. π¬--torsocks=auto|no|yes,--no-torsocksβ whether to wrapgit(1)andcurl(1)commands withtorsocks(1).- Default:
"auto"
- Default:
π 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-fetchwill also exit with curl"EXIT CODES"incurl(1)as documented in thecurl(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 π
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
- fedora 43: public-inbox 2.0.0~20230714git590023f-6.fc43 Β· AGPL-3.0-or-later
- fedora 44: public-inbox 2.0.0~20230714git590023f-6.fc43 Β· AGPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms