Date | Commit message (Collapse) |
|
Only noticed since this was on a new PERL_INLINE_DIRECTORY;
not sure if there's a good way to test this without blowing
away caches and slowing down tests even more :<
|
|
This enhances reusability in other projects which use the same C
shim. The executable will also be `lei.fuse' rather than `leifs',
because `leifs' is likely confused as `leafs' which makes no
sense.
|
|
This accounts for longer F3_NS values if we need them.
|
|
cache_readdir and keep_cache are independent flags, so we honor
the global keep_cache.
|
|
We can return the locked mutex to the caller which makes
it more apparent we need to unlock the mutex.
|
|
This shim is imported from another (as-yet-unannounced) AGPL-3+
project I started way back in May 2021. It turns out the small
C99 + libfuse3 shim is pretty generic aside from its name and
can be easily repurposed for any language or FUSE project.
I'm avoiding existing Perl FUSE bindings since they're
out-of-date w.r.t. FUSE 3 support, and Perl5 has a
thread-unfriendly standard library.
FUSE 3 adds readdirplus which is beneficial for Maildir, and
FUSE FSes are basically unusable without threads.
|
|
Maybe this can make our newish support of POP3 more
noticeable...
|
|
Base-85 binary patches were a source of false-positives in results
and we've filtered out in non-quoted text since July 2022.
Unfortunately, people were quoting binary patch contents
in replies (*sigh*) and triggering false positives in search
results. So we must filter out base-85-looking contents from
quoted text, too.
Followup-to: 8fda04081acde705 (search: do not index base-85 binary patches, 2022-06-20)
Followup-to: 840785917bc74c8e (searchidx: skip "delta $N" sections for base-85, 2022-07-19)
|
|
The epoch may already be read-only, and we don't need to cause
more I/O traffic and disk wear for no-op stuff. This fixes
idempotent use of public-inbox-clone to update multi-epoch
inboxes.
|
|
When a git process gets replaced (e.g. due to new
epochs/alternates), we must be careful and not abort the wrong
one.
I suspect this fixes the problem exacerbated by --batch-command.
It was theoretically possible w/o --batch-command, but it seems
to have made it surface more readily.
This should fix "Failed to retrieve generated blob" errors from
PublicInbox/ViewVCS.pm appearing in syslog
Link: https://public-inbox.org/meta/20230209012932.M934961@dcvr/
|
|
dt: is higher resolution and the YYYYMMDD column will be dropped
if there's ever another SCHEMA_VERSION update. While the
upcoming code repo index is independent of the mail schemas,
it'll use similar query prefixes and likely use d:/dt: for
Author Date of git commits.
|
|
The Xapian query transformation and Enquire object setup aren't
subject to MVCC and retries, so move it outside the retry loop
to save some cycles in case we need to retry on a busy DB.
|
|
When AllowEncodedSlashes is Off (the default setting), URLs containing
%2f are replied with a 404 error without calling the CGI. To (maybe)
prevent others debugging this issue add a hint with the solution.
|
|
Nowadays, mutt defaults to Message-IDs with `/' in them :<
|
|
I'm no longer updating them since it's noisy and acceptable
to not have them:
https://www.linuxfoundation.org/blog/copyright-notices-in-open-source-software-projects/
I'm tired of being reminded what year it is :<
|
|
The coderepo indexer will use similar ideas, I think...
|
|
public-inbox-{clone,fetch,netd} are all relatively new
developments which we can document, here.
We'll also update the generator Makefile snippet since there may
be more Graph::Easy-based docs coming.
|
|
-netd is strictly more powerful and a gateway drug for
imapd/nntpd/pop3d instances :>
|
|
We need to account for `git log' showing nothing for invalid
branches and continue to render properly. We'll also quiet down
`git log' stderr to avoid cluttering stderr, too.
|
|
No need to clutter up logs when a request hits a dead branch.
|
|
While having Xapian collapse threads is an easy way to reduce
the amount of deduplication work we need to do when writing
out threads; we can't rely on it when using `lei q -tt` since
that needs to flag all hits.
Reported-by: Maxim Mikityanskiy <maxtram95@gmail.com>
Link: https://public-inbox.org/git/Y+pgBmj0jxR+cVkD@mail.gmail.com/
|
|
Parse::RecDescent emits giant errors to STDERR by default
(bypassing $SIG{__WARN__}, even). Shut it up since there's
no good way to pass those back to a client, and we don't want
clients flooding logs with bogus requests.
|
|
Within the same forkgroup, we can assume the most recently updated
repo has the most data, so fetch those, first. We'll save new clones
for last since we can preserve {reference} ordering for them.
|
|
We can parse the config at once and avoid clobbering variables
which do not need changing. We'll also do some prep work for
fetch.hideRefs proposal being discussed at
<https://public-inbox.org/git/20230209122857.M669733@dcvr/>
|
|
While we can't waitpid() on daemonized process, we can abuse the
lack of FD_CLOEXEC to detect a process death. This saves
roughly 400ms for this slow test.
|
|
While awaitpid already registered a no-op callback in
_bidi_pipe, we can still call it again when registering it into
our event loop to ensure EPOLL_CTL_DEL fires.
|
|
Using the files ref backend for git, `delete' and `create'
operations for `update-ref --stdin' need to be processed in
separate transactions to avoid conflicts in cases where a file
becomes a directory (or presumably, vice versa).
|
|
We can't `use PublicInbox::Spawn' from SpawnPP because
PublicInbox::Spawn loads SpawnPP from BEGIN.
Fixes: 9eb8baf199cd148b (spawn_pp: use `which()' properly for pure-Perl spawn, 2023-01-29)
|
|
This makes the verbose progress output look nicer, but doesn't
affect the actual config file generation.
|
|
We can use `git -c $KEY=$VAL fetch' with a random remote name
that never makes it to a config file.
|
|
Our previous pinning prevention only worked to prevent older
(non-most-recent) topics from being pinned to the landing page,
but not the most recent window of messages.
We still sort messages within threads by Date: because that
makes git-send-email patchsets display more nicely, but we
don't want recent topics pinned due to future Date: headers.
I nearly switched sort_ds() back to sorting by Received: until
I looked back on commit 8e52e5fdea416d6fda0b8d301144af0c043a5a76
(use both Date: and Received: times, 2018-03-21) and was reminded
git-send-email relies on Date: for large series, so I added a
note about it for sort_ds().
Reported-by: Kyle Meyer <kyle@kyleam.com>
Tested-by: Kyle Meyer <kyle@kyleam.com>
Link: https://public-inbox.org/meta/87edr5gx63.fsf@kyleam.com/
|
|
This avoids unnecessary writes to the FETCH_HEAD file, which is
worthless in multi-remote mirrors. Actually, I haven't found
FETCH_HEAD useful anywhere since the `/remotes/' namespace
became popular...
|
|
We need to use the utf8 layer when writing files to be diffed,
and utf8::decode the `git diff' output. Furthermore, do the
CRLF > LF conversion early to avoid showing CRLF vs LF
differences in the diff, since that doesn't matter to MUAs
(nor our normal HTML views)
|
|
I noticed these while tracking down circular refs for commit
7b654d175cf2e31b (ipc: drop awaitpid_init to avoid circular refs, 2023-01-30).
While they're not the cause of circular refs, they're still
a waste of memory in worker processes.
|
|
We'll rely on defined(wantarray) to implicitly skip subtests,
and memoize these to reduce syscalls, since tests should
be short-lived enough to not be affected by new installations or
removals of git/xapian-compact/curl/etc...
|
|
t/run.perl now prints slowest 10 tests at startup, and I've
added ./devel/longest-tests to print all tests sorted by
elapsed time.
This should allow us to notice outliers more quickly in the
future.
|
|
This brings t/lei-index.t back down from ~8 to ~3s. I didn't
notice this before was because the LeiNoteEvent timer was firing
every 5s and clearing circular refs and parallel testing meant
the delay got hidden.
Fixes: 4a2a95bbc78f99c8 (ipc+lei: switch to awaitpid, 2023-01-17)
|
|
Uppercase characters aren't allowed for labels due to Xapian
boolean limitations, so we need to use lowercase labels.
Fixes: 27015c3365fd0690 (lei_input: disallow uppercase characters for labels, 2021-10-31)
|
|
I just encountered this error in xt/lei-auth-fail.t
|
|
Since it's an extremely small class and not subclassed or
anything, we'll make it even smaller as an arrayref.
We also don't load this for PublicInbox::WWW or anything that
runs in public-facing daemons.
|
|
On my x86-64 machine, OpenSSL SHA-256 is nearly twice as fast as
the Digest::SHA implementation from Perl, most likely due to an
optimized assembly implementation. SHA-1 is a few percent
faster, too.
|
|
I have no idea if mod_perl/mod_perl2 is used nowadays, but
we're stuck supporting it as long as mod_perl exists. So
add some tests and make minor updates to existing ones to
ensure it stays working.
|
|
We need to use the ternary operator in assignments to clobber
previous values of `$last'.
|
|
These are also in cgit, but we'll include CLI hints to show
viewers how our data is generated. We don't have "$REPO/refs/"
without (heads|tags) yet, though...
|
|
->translate should handle unlimited args, even if we don't
currently use it that way...
|
|
It's safe to call utf8::decode on data where "\0" exists.
|
|
Do not assume ".git" exists as a suffix in the repo nickname,
and filter out all trailing slashes in case it didn't get
filtered from Config.
|
|
Providing an Atom feed for tags can be a nice way for users
to subscribe to new releases without excessive noise.
|
|
Clients should see 404s when attempting to hit files for deleted
branches or tags.
|
|
`ambiguous' was added in git 2.21, and `dangling' was the only
other possible phrase which was inadvertantly slipped in prior
to 2.21. Thus there's no need to check for `notdir' or `loop'
responses since we aren't using `git cat-file --follow-symlinks'
anywhere.
|