git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Tan <jonathantanmy@google.com>
To: git@vger.kernel.org
Cc: Jonathan Tan <jonathantanmy@google.com>,
	steadmon@google.com,  hanyang.tony@bytedance.com,
	me@ttaylorr.com
Subject: [PATCH v2 0/4] When fetching from a promisor remote, repack local objects referenced
Date: Fri,  1 Nov 2024 13:11:44 -0700	[thread overview]
Message-ID: <cover.1730491845.git.jonathantanmy@google.com> (raw)
In-Reply-To: <cover.1729792911.git.jonathantanmy@google.com>

Thanks everyone for looking at it. Here's version 2.

Jonathan Tan (4):
  t0410: make test description clearer
  t0410: use from-scratch server
  t5300: move --window clamp test next to unclamped
  index-pack: repack local links into promisor packs

 Documentation/git-index-pack.txt |   5 ++
 builtin/index-pack.c             | 110 ++++++++++++++++++++++++++++++-
 builtin/pack-objects.c           |  28 ++++++++
 t/t0410-partial-clone.sh         |   6 +-
 t/t5300-pack-object.sh           |  10 +--
 t/t5616-partial-clone.sh         |  30 +++++++++
 6 files changed, 179 insertions(+), 10 deletions(-)

Range-diff against v1:
1:  b2c76c207d < -:  ---------- pack-objects: make variable non-static
2:  c220e77ccf = 1:  f405c9c9aa t0410: make test description clearer
3:  08750988e0 = 2:  ce9d5af42a t0410: use from-scratch server
4:  85fc3fa77e = 3:  1526a59e2d t5300: move --window clamp test next to unclamped
5:  5dd7fdc16d ! 4:  c51fac33fb index-pack: repack local links into promisor packs
    @@ builtin/index-pack.c: int cmd_index_pack(int argc,
      	 */
     
      ## builtin/pack-objects.c ##
    +@@ builtin/pack-objects.c: static enum {
    + static uint16_t write_bitmap_options = BITMAP_OPT_HASH_CACHE;
    + 
    + static int exclude_promisor_objects;
    ++static int exclude_promisor_objects_best_effort;
    + 
    + static int use_delta_islands;
    + 
     @@ builtin/pack-objects.c: static int option_parse_cruft_expiration(const struct option *opt UNUSED,
      	return 0;
      }
      
    -+static int should_include_obj(struct object *obj, void *data UNUSED)
    ++static int is_not_in_promisor_pack_obj(struct object *obj, void *data UNUSED)
     +{
     +	struct object_info info = OBJECT_INFO_INIT;
     +	if (oid_object_info_extended(the_repository, &obj->oid, &info, 0))
    @@ builtin/pack-objects.c: static int option_parse_cruft_expiration(const struct op
     +	return info.whence != OI_PACKED || !info.u.packed.pack->pack_promisor;
     +}
     +
    -+static int should_include(struct commit *commit, void *data) {
    -+	return should_include_obj((struct object *) commit, data);
    ++static int is_not_in_promisor_pack(struct commit *commit, void *data) {
    ++	return is_not_in_promisor_pack_obj((struct object *) commit, data);
     +}
     +
      int cmd_pack_objects(int argc,
      		     const char **argv,
      		     const char *prefix,
    -@@ builtin/pack-objects.c: int cmd_pack_objects(int argc,
    - 	struct list_objects_filter_options filter_options =
    - 		LIST_OBJECTS_FILTER_INIT;
    - 	int exclude_promisor_objects = 0;
    -+	int exclude_promisor_objects_best_effort = 0;
    - 
    - 	struct option pack_objects_options[] = {
    - 		OPT_CALLBACK_F('q', "quiet", &progress, NULL,
     @@ builtin/pack-objects.c: int cmd_pack_objects(int argc,
      		  option_parse_missing_action),
      		OPT_BOOL(0, "exclude-promisor-objects", &exclude_promisor_objects,
    @@ builtin/pack-objects.c: int cmd_pack_objects(int argc,
      		repo_init_revisions(the_repository, &revs, NULL);
      		list_objects_filter_copy(&revs.filter, &filter_options);
     +		if (exclude_promisor_objects_best_effort) {
    -+			revs.include_check = should_include;
    -+			revs.include_check_obj = should_include_obj;
    ++			revs.include_check = is_not_in_promisor_pack;
    ++			revs.include_check_obj = is_not_in_promisor_pack_obj;
     +		}
      		get_object_list(&revs, rp.nr, rp.v);
      		release_revisions(&revs);
-- 
2.47.0.163.g1226f6d8fa-goog


  parent reply	other threads:[~2024-11-01 20:11 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-24 18:08 [PATCH 0/5] When fetching from a promisor remote, repack local objects referenced Jonathan Tan
2024-10-24 18:08 ` [PATCH 1/5] pack-objects: make variable non-static Jonathan Tan
2024-10-28  0:30   ` Taylor Blau
2024-10-28 19:34     ` Jonathan Tan
2024-10-28 19:50       ` Taylor Blau
2024-10-28 23:04         ` Jonathan Tan
2024-10-24 18:08 ` [PATCH 2/5] t0410: make test description clearer Jonathan Tan
2024-10-24 18:08 ` [PATCH 3/5] t0410: use from-scratch server Jonathan Tan
2024-10-24 18:08 ` [PATCH 4/5] t5300: move --window clamp test next to unclamped Jonathan Tan
2024-10-24 18:08 ` [PATCH 5/5] index-pack: repack local links into promisor packs Jonathan Tan
2024-10-30 22:29   ` Josh Steadmon
2024-11-01 20:14     ` Jonathan Tan
2024-10-25  6:04 ` [External] [PATCH 0/5] When fetching from a promisor remote, repack local objects referenced Han Young
2024-10-25 21:07   ` Taylor Blau
2024-11-02 10:38     ` Junio C Hamano
2024-10-25 21:07 ` Taylor Blau
2024-11-01 20:11 ` Jonathan Tan [this message]
2024-11-01 20:11   ` [PATCH v2 1/4] t0410: make test description clearer Jonathan Tan
2024-11-01 20:11   ` [PATCH v2 2/4] t0410: use from-scratch server Jonathan Tan
2024-11-01 20:11   ` [PATCH v2 3/4] t5300: move --window clamp test next to unclamped Jonathan Tan
2024-11-13  7:35     ` Jeff King
2024-11-13 18:26       ` Jonathan Tan
2024-11-14  0:56         ` Jeff King
2024-11-14  6:41           ` Junio C Hamano
2024-11-15  9:52             ` Jeff King
2024-11-15 19:55           ` Jonathan Tan
2024-11-16  3:23             ` Jeff King
2024-11-18 19:02               ` [PATCH] index-pack: teach --promisor to require --stdin Jonathan Tan
2024-11-19  3:29                 ` Junio C Hamano
2024-11-19 18:53                 ` Jeff King
2024-11-20  1:34                   ` Junio C Hamano
2024-11-19 20:10               ` [PATCH v2] index-pack: teach --promisor to forbid pack name Jonathan Tan
2024-11-20  6:29                 ` Jeff King
2024-11-14  0:59       ` [PATCH v2 3/4] t5300: move --window clamp test next to unclamped Jeff King
2024-11-01 20:11   ` [PATCH v2 4/4] index-pack: repack local links into promisor packs Jonathan Tan
2024-11-04  0:22   ` [PATCH v2 0/4] When fetching from a promisor remote, repack local objects referenced Junio C Hamano
2024-11-04  2:05     ` Junio C Hamano

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.1730491845.git.jonathantanmy@google.com \
    --to=jonathantanmy@google.com \
    --cc=git@vger.kernel.org \
    --cc=hanyang.tony@bytedance.com \
    --cc=me@ttaylorr.com \
    --cc=steadmon@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 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 NNTP newsgroup(s).