From: Michael Haggerty <mhagger@alum.mit.edu>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>,
"Stefan Beller" <sbeller@google.com>,
"Johannes Schindelin" <Johannes.Schindelin@gmx.de>,
"David Turner" <novalis@novalis.org>, "Jeff King" <peff@peff.net>,
git@vger.kernel.org, "Michael Haggerty" <mhagger@alum.mit.edu>
Subject: [PATCH v2 0/9] Store submodules in a hash, not a linked list
Date: Fri, 10 Feb 2017 12:16:10 +0100 [thread overview]
Message-ID: <cover.1486724698.git.mhagger@alum.mit.edu> (raw)
This is v2 of the patch series, considerably reorganized but not that
different codewise. Thanks to Stefan, Junio, and Peff for their
feedback about v1 [1]. I think I have addressed all of your comments.
Changes since v1:
* Rebase from `master` onto `maint` (to match Junio).
* Reorder some commits to make the presentation more logical.
* Added an explicit preparatory commit that just reorders some
function definitions, because it makes the diff for the subsequent
commit a lot easier to read.
* Make some preexisting functions private:
* lookup_ref_store()
* ref_store_init()
* Remove some unnecessary handling of `submodule == ""` when it is
already known to have been converted to `NULL`. (Some of the
purported handling also happened to be broken.)
* Introduce function `register_ref_store()` in a separate step, before
switching to hashmaps.
* Don't initialize hashmap in `lookup_ref_store()`. (Just return
`NULL`; the hashmap will be initialized in `register_ref_store()` a
moment later.)
* Make code in `submodule_hash_cmp()` clearer.
* Use `FLEX_ALLOC_STR()` in `alloc_submodule_hash_entry()`.
* Don't specify an initial size for the submodule hashmap (the default
is OK).
This patch series is also available from my fork on GitHub [2] as
branch "submodule-hash".
Michael
[1] http://public-inbox.org/git/cover.1486629195.git.mhagger@alum.mit.edu/T/#u
[2] https://github.com/mhagger/git
Michael Haggerty (9):
refs: reorder some function definitions
refs: make some ref_store lookup functions private
refs: remove some unnecessary handling of submodule == ""
register_ref_store(): new function
refs: store submodule ref stores in a hashmap
refs: push the submodule attribute down
base_ref_store_init(): remove submodule argument
files_ref_store::submodule: use NULL for the main repository
read_loose_refs(): read refs using resolve_ref_recursively()
refs.c | 107 +++++++++++++++++++++++++++++++++++----------------
refs/files-backend.c | 77 +++++++++++++++++++++---------------
refs/refs-internal.h | 48 ++++-------------------
3 files changed, 127 insertions(+), 105 deletions(-)
--
2.9.3
next reply other threads:[~2017-02-10 11:16 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-10 11:16 Michael Haggerty [this message]
2017-02-10 11:16 ` [PATCH v2 1/9] refs: reorder some function definitions Michael Haggerty
2017-02-10 19:14 ` Junio C Hamano
2017-02-10 11:16 ` [PATCH v2 2/9] refs: make some ref_store lookup functions private Michael Haggerty
2017-02-10 11:16 ` [PATCH v2 3/9] refs: remove some unnecessary handling of submodule == "" Michael Haggerty
2017-02-10 11:16 ` [PATCH v2 4/9] register_ref_store(): new function Michael Haggerty
2017-02-10 11:16 ` [PATCH v2 5/9] refs: store submodule ref stores in a hashmap Michael Haggerty
2017-02-10 11:16 ` [PATCH v2 6/9] refs: push the submodule attribute down Michael Haggerty
2017-02-10 11:16 ` [PATCH v2 7/9] base_ref_store_init(): remove submodule argument Michael Haggerty
2017-02-10 11:16 ` [PATCH v2 8/9] files_ref_store::submodule: use NULL for the main repository Michael Haggerty
2017-02-10 11:16 ` [PATCH v2 9/9] read_loose_refs(): read refs using resolve_ref_recursively() Michael Haggerty
2017-02-10 19:22 ` Junio C Hamano
2017-02-13 6:40 ` Michael Haggerty
2017-02-13 23:18 ` Junio C Hamano
2017-02-10 15:56 ` [PATCH v2 0/9] Store submodules in a hash, not a linked list Jeff King
2017-02-10 16:44 ` Stefan Beller
2017-02-10 19:23 ` Junio C Hamano
2017-02-13 3:09 ` David Turner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1486724698.git.mhagger@alum.mit.edu \
--to=mhagger@alum.mit.edu \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=novalis@novalis.org \
--cc=pclouds@gmail.com \
--cc=peff@peff.net \
--cc=sbeller@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.