Re: [PATCH v2 26/27] hash-ll, hashmap: move oidhash() to hash-ll
- From
- Jonathan Tan <jonathantanmy@google.com>
- Date
- May 16, 2023, 00:16 UTC
- Message-ID
- <20230516001615.1460450-1-jonathantanmy@google.com>
- In-Reply-To
- <41d48379b3dc4b621b097e145fc3be6257466654.1683875072.git.gitgitgadget@gmail.com>
"Elijah Newren via GitGitGadget" <gitgitgadget@gmail.com> writes:
> Move this function to hash-ll, so that khash.h can stop depending upon > hashmap.h.
[snip]
> Diff best viewed with `--color-moved`. Note that there's a small but > important change to khash.h in this patch as well to allow this move, > which is easy to overlook.
[snip]
Show 10 quoted lines
> diff --git a/khash.h b/khash.h > index a0a08dad8b7..ff881631778 100644 > --- a/khash.h > +++ b/khash.h > @@ -26,7 +26,6 @@ > #ifndef __AC_KHASH_H > #define __AC_KHASH_H > > -#include "hashmap.h" > #include "hash.h"
Is this the small but important change to khash.h? I thought that this is the reason for the change, not what "allow[ed]" this move.
> diff --git a/object-name.c b/object-name.c > index 45f4d51305b..7e96c97051e 100644 > --- a/object-name.c > +++ b/object-name.c
[snip]
Show 9 quoted lines
> +struct raw_object_store {
> + /*
> + * Set of all object directories; the main directory is first (and
> + * cannot be NULL after initialization). Subsequent directories are
> + * alternates.
> + */
> + struct object_directory *odb;
> + struct object_directory **odb_tail;
> + struct kh_odb_path_map *odb_by_path;This is not present as a minus line (that line uses kh_odb_path_map_t). I thought this was so that we could forward declare "struct kh_odb_path_map", but I don't see such a forward declaration. (Was it declared elsewhere?)
Everything else looks good.