🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.git
1 messages
1 total messages Started by Christian Couder Tue, 27 Oct 2026 12:13
Re: [PATCH v2 4/6] odb/source-files: simplify directory duplication detection
#1612
Author: Christian Couder
Date: Tue, 27 Oct 2026 12:13
60 lines
13723 bytes
On Fri, Oct 23, 2026 at 2:48 PM Patrick Steinhardt <ps@pks.im> wrote:

> -/*
> - * NEEDSWORK: we're using "core.ignoreCase" to deduplicate alternates that
> - * _may_ be the same. This requires quite a bit of boilerplate for dubious
> - * benefit:
> - *
> - *   - Duplicating alternates should really only lead to regressed performance.
> - *
> - *   - We don't properly resolve symlinks or mointpoints, so we may still end
> - *     up duplicating alternates.
> - *
> - *   - The value may be lying, in which case we might deduplicate alternates
> - *     that are in fact not mapping to the same directory.
> - *
> - * We should investigate whether we can remove this whole mechanism outright.
> - */

Removing this NEEDSWORK isn't mentioned in the commit message. I agree
that the boilerplate is reduced with the new implementation, but I
think the points regarding mount points and a wrong `core.ignoreCase`
might still be interesting.

> @@ -55,17 +50,17 @@ struct odb_source_files {
>         struct odb_files_dir **dirs_tail;
>
>         /*
> -        * Map of object directories, keyed by their respective paths. This
> -        * map is used to detect the case where the same directory is
> -        * registered multiple times.
> +        * Set of directory paths that have already been linked into this
> +        * source. This map is used to detect the case where the same directory

s/map/set/

> +        * is registered multiple times.
>          */
> -       struct hashmap dirs_by_path;
> +       struct strset dir_paths;
>
>         /*
>          * Whether directory paths shall be compared case-insensitively, as
>          * determined by "core.ignoreCase".
>          */
> -       int dirs_paths_icase;
> +       int dir_paths_icase;

Nit: I guess this is to match the name of the strset, but it could
have been mentioned in the commit message.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads