git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Re: [PATCH 00/11] Moving global state into the repository object (part 2)
@ 2018-03-03  2:54 Duy Nguyen
  2018-03-03 11:35 ` [PATCH 00/44] reroll nd/remove-ignore-env.. sb/object-store and sb/packfiles Nguyễn Thái Ngọc Duy
  0 siblings, 1 reply; 137+ messages in thread
From: Duy Nguyen @ 2018-03-03  2:54 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Stefan Beller, git

On Thu, Mar 1, 2018 at 2:09 AM, Junio C Hamano <gitster@pobox.com> wrote:
> Stefan Beller <sbeller@google.com> writes:
>
>> On Wed, Feb 28, 2018 at 9:59 AM, Junio C Hamano <gitster@pobox.com> wrote:
>>> Duy Nguyen <pclouds@gmail.com> writes:
>>>
>>>> Looking at the full-series diff though, it makes me wonder if we
>>>> should keep prepare_packed_git() private (i.e. how we initialize the
>>>> object store, packfile included, is a private matter). How about
>>>> something like this on top?
>>>
>>> Yup, that looks cleaner.
>>
>> I agree that it looks cleaner. So we plan on just putting
>> it on top of that series?
>
> We tend to avoid "oops, that was wrong and here is a band aid on
> top" for things that are still mushy, so it would be preferrable to
> get it fixed inline, especially if there are more changes to the
> other parts of the series coming.

I agree with this. Stefan, if you're getting bored with rerolling
refactor patches, I can update this series and send out v2.
-- 
Duy

^ permalink raw reply	[flat|nested] 137+ messages in thread
* [PATCHv2 00/16] Moving global state into the repository object (part 1)
@ 2018-02-16 17:46 Stefan Beller
  2018-02-21  1:54 ` [PATCHv3 00/27] " Stefan Beller
  0 siblings, 1 reply; 137+ messages in thread
From: Stefan Beller @ 2018-02-16 17:46 UTC (permalink / raw)
  To: gitster; +Cc: git, jonathantanmy, pclouds, sbeller, sunshine

v2:
* duplicated the 'ignore_env' bit into the object store as well
* the #define trick no longer works as we do not have a "the_objectstore" global,
  which means there is just one patch per function that is converted.
  As this follows the same structure of the previous series, I am still confident
  there is no hidden dependencies to globals outside the object store in these
  converted functions.
* rebased on top of current master, resolving the merge conflicts.
  I think I used the list.h APIs right, but please double check.
  
Thanks,
Stefan

v1:
This is a real take on the first part of the recent RFC[1].

Jonathan Tan suggested[2] that "sha1_loose_object_info to handle arbitrary repositories"
might be a good breaking point for a first part at that RFC at patch 38.
This series is smaller and contains only 26 patches as the patches in the big
RFC were slightly out of order.

I developed this series partly by writing patches, but mostly by cherrypicking
from that RFC on top of current master. I noticed no external conflicts apart
from one addition to the repositories _INIT macro, which was easy to resolve.

Comments in the early range of that RFC were on 003 where Junio pointed out
that the coccinelle patch ought to be not in contrib/coccinelle, so I put it
in a sub directory there, as 'make coccicheck' doesn't traverse subdirs.

brian had a questoin on patch 25 in the RFC, but that seemed to resolve itself
without any suggestion to include into this series[3].

Duy suggested that we shall not use the repository blindly, but should carefully
examine whether to pass on an object store or the refstore or such[4], which
I agree with if it makes sense. This series unfortunately has an issue with that
as I would not want to pass down the `ignore_env` flag separately from the object
store, so I made all functions that only take the object store to have the raw
object store as the first parameter, and others using the full repository.

Eric Sunshine brought up memory leaks with the RFC, and I would think to
have plugged all holes.

[1] https://public-inbox.org/git/20180205235508.216277-1-sbeller@google.com/
[2] https://public-inbox.org/git/20180207143300.ce1c39ca07f6a0d64fe0e7ca@google.com/
[3] https://public-inbox.org/git/20180206011940.GD7904@genre.crustytoothpaste.net/
[4] https://public-inbox.org/git/CACsJy8CGgekpX4cZkyyTSPrj87uQVKZSOL7fyT__P2dh_1LmVQ@mail.gmail.com/

Thanks,
Stefan

Stefan Beller (16):
  repository: introduce raw object store field
  object-store: move alt_odb_list and alt_odb_tail to object store
  object-store: free alt_odb_list
  object-store: move packed_git and packed_git_mru to object store
  object-store: close all packs upon clearing the object store
  pack: move prepare_packed_git_run_once to object store
  pack: move approximate object count to object store
  sha1_file: add raw_object_store argument to alt_odb_usable
  sha1_file: allow link_alt_odb_entries to handle arbitrary object
    stores
  sha1_file: allow prepare_alt_odb to handle arbitrary object stores
  sha1_file: allow sha1_file_name to handle arbitrary object stores
  sha1_file: allow stat_sha1_file to handle arbitrary object stores
  sha1_file: allow open_sha1_file to handle arbitrary object stores
  sha1_file: allow map_sha1_file_1 to handle arbitrary object stores
  sha1_file: allow map_sha1_file to handle arbitrary object stores
  sha1_file: allow sha1_loose_object_info to handle arbitrary object
    stores

 builtin/am.c             |   2 +-
 builtin/clone.c          |   2 +-
 builtin/count-objects.c  |   6 +-
 builtin/fetch.c          |   2 +-
 builtin/fsck.c           |  13 +++--
 builtin/gc.c             |   4 +-
 builtin/grep.c           |   2 +-
 builtin/index-pack.c     |   1 +
 builtin/merge.c          |   2 +-
 builtin/pack-objects.c   |  19 +++---
 builtin/pack-redundant.c |   6 +-
 builtin/receive-pack.c   |   3 +-
 cache.h                  |  45 ++------------
 environment.c            |   5 +-
 fast-import.c            |   6 +-
 http-backend.c           |   6 +-
 http-push.c              |   1 +
 http-walker.c            |   4 +-
 http.c                   |   6 +-
 object-store.h           |  80 +++++++++++++++++++++++++
 object.c                 |  27 +++++++++
 pack-bitmap.c            |   4 +-
 pack-check.c             |   1 +
 pack-revindex.c          |   1 +
 packfile.c               |  64 ++++++++++----------
 packfile.h               |   2 +-
 path.c                   |   2 +-
 reachable.c              |   1 +
 repository.c             |  22 +++++--
 repository.h             |   7 ++-
 server-info.c            |   6 +-
 sha1_file.c              | 123 +++++++++++++++++++++------------------
 sha1_name.c              |  11 ++--
 streaming.c              |   5 +-
 34 files changed, 314 insertions(+), 177 deletions(-)
 create mode 100644 object-store.h

-- 
2.16.1.291.g4437f3f132-goog


^ permalink raw reply	[flat|nested] 137+ messages in thread

end of thread, other threads:[~2018-03-26 21:05 UTC | newest]

Thread overview: 137+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-03  2:54 [PATCH 00/11] Moving global state into the repository object (part 2) Duy Nguyen
2018-03-03 11:35 ` [PATCH 00/44] reroll nd/remove-ignore-env.. sb/object-store and sb/packfiles Nguyễn Thái Ngọc Duy
2018-03-03 11:35   ` [PATCH 01/44] repository: initialize the_repository in main() Nguyễn Thái Ngọc Duy
2018-03-21 21:46     ` Brandon Williams
2018-03-03 11:35   ` [PATCH 02/44] repository.c: move env-related setup code back to environment.c Nguyễn Thái Ngọc Duy
2018-03-19 18:07     ` Jonathan Tan
2018-03-19 18:56       ` Duy Nguyen
2018-03-21 21:53         ` Brandon Williams
2018-03-03 11:35   ` [PATCH 03/44] repository.c: delete dead functions Nguyễn Thái Ngọc Duy
2018-03-21 21:57     ` Brandon Williams
2018-03-03 11:35   ` [PATCH 04/44] sha1_file.c: move delayed getenv(altdb) back to setup_git_env() Nguyễn Thái Ngọc Duy
2018-03-21 21:59     ` Brandon Williams
2018-03-03 11:35   ` [PATCH 05/44] repository: delete ignore_env member Nguyễn Thái Ngọc Duy
2018-03-21 21:59     ` Brandon Williams
2018-03-03 11:35   ` [PATCH 06/44] repository: introduce raw object store field Nguyễn Thái Ngọc Duy
2018-03-04  2:19     ` Eric Sunshine
2018-03-21 22:04     ` Brandon Williams
2018-03-03 11:36   ` [PATCH 07/44] object-store: migrate alternates struct and functions from cache.h Nguyễn Thái Ngọc Duy
2018-03-03 11:36   ` [PATCH 08/44] object-store: move alt_odb_list and alt_odb_tail to object store Nguyễn Thái Ngọc Duy
2018-03-03 11:36   ` [PATCH 09/44] object-store: free alt_odb_list Nguyễn Thái Ngọc Duy
2018-03-04  2:37     ` Eric Sunshine
2018-03-05  9:54       ` Duy Nguyen
2018-03-21 22:10       ` Brandon Williams
2018-03-03 11:36   ` [PATCH 10/44] object-store: move packed_git and packed_git_mru to object store Nguyễn Thái Ngọc Duy
2018-03-19 19:39     ` Jonathan Tan
2018-03-23 16:57       ` Duy Nguyen
2018-03-21 22:18     ` Brandon Williams
2018-03-23 17:03       ` Duy Nguyen
2018-03-23 17:07         ` Duy Nguyen
2018-03-23 18:28           ` Brandon Williams
2018-03-03 11:36   ` [PATCH 11/44] object-store: close all packs upon clearing the " Nguyễn Thái Ngọc Duy
2018-03-21 22:19     ` Brandon Williams
2018-03-03 11:36   ` [PATCH 12/44] pack: move prepare_packed_git_run_once to " Nguyễn Thái Ngọc Duy
2018-03-21 22:25     ` Brandon Williams
2018-03-03 11:36   ` [PATCH 13/44] pack: move approximate object count " Nguyễn Thái Ngọc Duy
2018-03-04  2:47     ` Eric Sunshine
2018-03-04  3:41       ` Duy Nguyen
2018-03-21 22:26         ` Brandon Williams
2018-03-03 11:36   ` [PATCH 14/44] sha1_file: add raw_object_store argument to alt_odb_usable Nguyễn Thái Ngọc Duy
2018-03-03 11:36   ` [PATCH 15/44] sha1_file: add repository argument to link_alt_odb_entry Nguyễn Thái Ngọc Duy
2018-03-03 11:36   ` [PATCH 16/44] sha1_file: add repository argument to read_info_alternates Nguyễn Thái Ngọc Duy
2018-03-03 11:36   ` [PATCH 17/44] sha1_file: add repository argument to link_alt_odb_entries Nguyễn Thái Ngọc Duy
2018-03-03 11:36   ` [PATCH 18/44] sha1_file: add repository argument to prepare_alt_odb Nguyễn Thái Ngọc Duy
2018-03-03 11:36   ` [PATCH 19/44] sha1_file: allow link_alt_odb_entries to handle arbitrary repositories Nguyễn Thái Ngọc Duy
2018-03-21 22:30     ` Brandon Williams
2018-03-03 11:36   ` [PATCH 20/44] sha1_file: allow prepare_alt_odb " Nguyễn Thái Ngọc Duy
2018-03-03 11:36   ` [PATCH 21/44] sha1_file: add repository argument to sha1_file_name Nguyễn Thái Ngọc Duy
2018-03-03 11:36   ` [PATCH 22/44] sha1_file: add repository argument to stat_sha1_file Nguyễn Thái Ngọc Duy
2018-03-03 11:36   ` [PATCH 23/44] sha1_file: add repository argument to open_sha1_file Nguyễn Thái Ngọc Duy
2018-03-03 11:36   ` [PATCH 24/44] sha1_file: add repository argument to map_sha1_file_1 Nguyễn Thái Ngọc Duy
2018-03-03 11:36   ` [PATCH 25/44] sha1_file: add repository argument to map_sha1_file Nguyễn Thái Ngọc Duy
2018-03-03 11:36   ` [PATCH 26/44] sha1_file: add repository argument to sha1_loose_object_info Nguyễn Thái Ngọc Duy
2018-03-03 11:36   ` [PATCH 27/44] sha1_file: allow sha1_file_name to handle arbitrary repositories Nguyễn Thái Ngọc Duy
2018-03-03 11:36   ` [PATCH 28/44] sha1_file: allow stat_sha1_file " Nguyễn Thái Ngọc Duy
2018-03-03 11:36   ` [PATCH 29/44] sha1_file: allow open_sha1_file " Nguyễn Thái Ngọc Duy
2018-03-03 11:36   ` [PATCH 30/44] sha1_file: allow map_sha1_file_1 " Nguyễn Thái Ngọc Duy
2018-03-03 11:36   ` [PATCH 31/44] sha1_file: allow map_sha1_file " Nguyễn Thái Ngọc Duy
2018-03-03 11:36   ` [PATCH 32/44] sha1_file: allow sha1_loose_object_info " Nguyễn Thái Ngọc Duy
2018-03-21 22:34     ` Brandon Williams
2018-03-03 11:36   ` [PATCH 33/44] packfile: allow prepare_packed_git_mru " Nguyễn Thái Ngọc Duy
2018-03-03 11:36   ` [PATCH 34/44] packfile: allow rearrange_packed_git " Nguyễn Thái Ngọc Duy
2018-03-03 11:36   ` [PATCH 35/44] packfile: allow install_packed_git " Nguyễn Thái Ngọc Duy
2018-03-03 11:36   ` [PATCH 36/44] packfile: add repository argument to prepare_packed_git_one Nguyễn Thái Ngọc Duy
2018-03-03 11:36   ` [PATCH 37/44] packfile: add repository argument to prepare_packed_git Nguyễn Thái Ngọc Duy
2018-03-04  3:03     ` Eric Sunshine
2018-03-03 11:36   ` [PATCH 38/44] packfile: add repository argument to reprepare_packed_git Nguyễn Thái Ngọc Duy
2018-03-03 11:36   ` [PATCH 39/44] packfile: allow prepare_packed_git_one to handle arbitrary repositories Nguyễn Thái Ngọc Duy
2018-03-19 20:10     ` Jonathan Tan
2018-03-03 11:36   ` [PATCH 40/44] packfile: allow prepare_packed_git " Nguyễn Thái Ngọc Duy
2018-03-21 22:39     ` Brandon Williams
2018-03-22  1:47       ` Junio C Hamano
2018-03-03 11:36   ` [PATCH 41/44] packfile: allow reprepare_packed_git " Nguyễn Thái Ngọc Duy
2018-03-03 11:36   ` [PATCH 42/44] packfile: add repository argument to find_pack_entry Nguyễn Thái Ngọc Duy
2018-03-03 11:36   ` [PATCH 43/44] packfile: allow find_pack_entry to handle arbitrary repositories Nguyễn Thái Ngọc Duy
2018-03-03 11:36   ` [PATCH 44/44] packfile: keep prepare_packed_git() private Nguyễn Thái Ngọc Duy
2018-03-19 20:34     ` Jonathan Tan
2018-03-21 22:42     ` Brandon Williams
2018-03-05 19:13   ` [PATCH 00/44] reroll nd/remove-ignore-env.. sb/object-store and sb/packfiles Junio C Hamano
2018-03-21 22:43   ` Brandon Williams
2018-03-23 15:55   ` [PATCH 0/1] nd/remove-ignore-env-field updates Nguyễn Thái Ngọc Duy
2018-03-23 15:55     ` [PATCH 1/1] repository.h: add comment and clarify repo_set_gitdir Nguyễn Thái Ngọc Duy
2018-03-26 21:04       ` Stefan Beller
2018-03-26 21:05         ` Stefan Beller
2018-03-23 17:20   ` [PATCH 00/27] sb/object-store updates Nguyễn Thái Ngọc Duy
2018-03-23 17:20     ` [PATCH 01/27] repository: introduce raw object store field Nguyễn Thái Ngọc Duy
2018-03-23 17:20     ` [PATCH 02/27] object-store: migrate alternates struct and functions from cache.h Nguyễn Thái Ngọc Duy
2018-03-23 17:20     ` [PATCH 03/27] object-store: move alt_odb_list and alt_odb_tail to object store Nguyễn Thái Ngọc Duy
2018-03-23 17:20     ` [PATCH 04/27] object-store: free alt_odb_list Nguyễn Thái Ngọc Duy
2018-03-23 18:43       ` Brandon Williams
2018-03-23 17:20     ` [PATCH 05/27] object-store: move packed_git and packed_git_mru to object store Nguyễn Thái Ngọc Duy
2018-03-23 17:21     ` [PATCH 06/27] object-store: close all packs upon clearing the " Nguyễn Thái Ngọc Duy
2018-03-23 17:21     ` [PATCH 07/27] pack: move prepare_packed_git_run_once to " Nguyễn Thái Ngọc Duy
2018-03-23 17:21     ` [PATCH 08/27] pack: move approximate object count " Nguyễn Thái Ngọc Duy
2018-03-23 17:21     ` [PATCH 09/27] sha1_file: add raw_object_store argument to alt_odb_usable Nguyễn Thái Ngọc Duy
2018-03-23 17:21     ` [PATCH 10/27] sha1_file: add repository argument to link_alt_odb_entry Nguyễn Thái Ngọc Duy
2018-03-23 17:21     ` [PATCH 11/27] sha1_file: add repository argument to read_info_alternates Nguyễn Thái Ngọc Duy
2018-03-23 17:21     ` [PATCH 12/27] sha1_file: add repository argument to link_alt_odb_entries Nguyễn Thái Ngọc Duy
2018-03-23 17:21     ` [PATCH 13/27] sha1_file: add repository argument to prepare_alt_odb Nguyễn Thái Ngọc Duy
2018-03-23 17:21     ` [PATCH 14/27] sha1_file: allow link_alt_odb_entries to handle arbitrary repositories Nguyễn Thái Ngọc Duy
2018-03-23 17:21     ` [PATCH 15/27] sha1_file: allow prepare_alt_odb " Nguyễn Thái Ngọc Duy
2018-03-23 17:21     ` [PATCH 16/27] sha1_file: add repository argument to sha1_file_name Nguyễn Thái Ngọc Duy
2018-03-23 17:21     ` [PATCH 17/27] sha1_file: add repository argument to stat_sha1_file Nguyễn Thái Ngọc Duy
2018-03-23 17:21     ` [PATCH 18/27] sha1_file: add repository argument to open_sha1_file Nguyễn Thái Ngọc Duy
2018-03-23 17:21     ` [PATCH 19/27] sha1_file: add repository argument to map_sha1_file_1 Nguyễn Thái Ngọc Duy
2018-03-23 17:21     ` [PATCH 20/27] sha1_file: add repository argument to map_sha1_file Nguyễn Thái Ngọc Duy
2018-03-23 17:21     ` [PATCH 21/27] sha1_file: add repository argument to sha1_loose_object_info Nguyễn Thái Ngọc Duy
2018-03-23 17:21     ` [PATCH 22/27] sha1_file: allow sha1_file_name to handle arbitrary repositories Nguyễn Thái Ngọc Duy
2018-03-23 17:21     ` [PATCH 23/27] sha1_file: allow stat_sha1_file " Nguyễn Thái Ngọc Duy
2018-03-23 17:21     ` [PATCH 24/27] sha1_file: allow open_sha1_file " Nguyễn Thái Ngọc Duy
2018-03-23 17:21     ` [PATCH 25/27] sha1_file: allow map_sha1_file_1 " Nguyễn Thái Ngọc Duy
2018-03-23 17:21     ` [PATCH 26/27] sha1_file: allow map_sha1_file " Nguyễn Thái Ngọc Duy
2018-03-23 17:21     ` [PATCH 27/27] sha1_file: allow sha1_loose_object_info " Nguyễn Thái Ngọc Duy
2018-03-23 18:35     ` [PATCH 00/27] sb/object-store updates Brandon Williams
2018-03-23 18:50       ` Brandon Williams
2018-03-23 21:31         ` Junio C Hamano
2018-03-23 18:58       ` Duy Nguyen
2018-03-23 22:07     ` Eric Sunshine
2018-03-24  5:31       ` Duy Nguyen
2018-03-26 17:45         ` Stefan Beller
2018-03-26 18:09           ` Junio C Hamano
2018-03-26 19:27             ` Junio C Hamano
2018-03-23 17:45   ` [PATCH 00/12] sb/packfiles-in-repository updates Nguyễn Thái Ngọc Duy
2018-03-23 17:45     ` [PATCH 01/12] packfile: allow prepare_packed_git_mru to handle arbitrary repositories Nguyễn Thái Ngọc Duy
2018-03-23 17:45     ` [PATCH 02/12] packfile: allow rearrange_packed_git " Nguyễn Thái Ngọc Duy
2018-03-23 17:45     ` [PATCH 03/12] packfile: allow install_packed_git " Nguyễn Thái Ngọc Duy
2018-03-23 17:45     ` [PATCH 04/12] packfile: add repository argument to prepare_packed_git_one Nguyễn Thái Ngọc Duy
2018-03-23 17:45     ` [PATCH 05/12] packfile: add repository argument to prepare_packed_git Nguyễn Thái Ngọc Duy
2018-03-23 17:45     ` [PATCH 06/12] packfile: add repository argument to reprepare_packed_git Nguyễn Thái Ngọc Duy
2018-03-23 17:45     ` [PATCH 07/12] packfile: allow prepare_packed_git_one to handle arbitrary repositories Nguyễn Thái Ngọc Duy
2018-03-23 17:45     ` [PATCH 08/12] packfile: allow prepare_packed_git " Nguyễn Thái Ngọc Duy
2018-03-23 17:45     ` [PATCH 09/12] packfile: allow reprepare_packed_git " Nguyễn Thái Ngọc Duy
2018-03-23 17:45     ` [PATCH 10/12] packfile: add repository argument to find_pack_entry Nguyễn Thái Ngọc Duy
2018-03-23 17:45     ` [PATCH 11/12] packfile: allow find_pack_entry to handle arbitrary repositories Nguyễn Thái Ngọc Duy
2018-03-23 17:45     ` [PATCH 12/12] packfile: keep prepare_packed_git() private Nguyễn Thái Ngọc Duy
2018-03-23 20:15     ` [PATCH 00/12] sb/packfiles-in-repository updates Brandon Williams
  -- strict thread matches above, loose matches on Subject: below --
2018-02-16 17:46 [PATCHv2 00/16] Moving global state into the repository object (part 1) Stefan Beller
2018-02-21  1:54 ` [PATCHv3 00/27] " Stefan Beller
2018-02-21  1:54   ` [PATCH 09/27] sha1_file: add raw_object_store argument to alt_odb_usable Stefan Beller
2018-02-22  0:29     ` Jonathan Tan

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).