All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Couder <christian.couder@gmail.com>
To: Jeff King <peff@peff.net>
Cc: git <git@vger.kernel.org>, Junio C Hamano <gitster@pobox.com>,
	Derrick Stolee <dstolee@microsoft.com>,
	Taylor Blau <me@ttaylorr.com>,
	Jonathan Tan <jonathantanmy@google.com>,
	Jonathan Nieder <jrnieder@gmail.com>,
	Christian Couder <chriscool@tuxfamily.org>
Subject: Re: [PATCH 00/13] upload-pack: use 'struct upload_pack_data' thoroughly, part 1
Date: Tue, 19 May 2020 11:44:03 +0200	[thread overview]
Message-ID: <CAP8UFD1JndLk=cxguLuwv+hV5-TdNrr+oT4wJ4bBhhCHe9JM4w@mail.gmail.com> (raw)
In-Reply-To: <20200515185534.GN3692649@coredump.intra.peff.net>

On Fri, May 15, 2020 at 8:55 PM Jeff King <peff@peff.net> wrote:
>
> On Fri, May 15, 2020 at 02:47:16PM -0400, Jeff King wrote:
>
> > > While there are still a lot of static variables at the top of
> > > 'upload-pack.c' after this patch series, it does a lot of ground work
> > > and a number of cleanups.
> >
> > Yeah, I think all of use_thin_pack, use_ofs_delta, etc, should be easy
> > conversions on top (and will really give us the payoff).
>
> Hmm, none of those fields in upload_pack_data are used, even for v2!
> I.e., if I apply this patch:

[...]

> it still compiles. So starting to use those would be a behavior change,
> as we accidentally let use_ofs_delta, etc, propagate from one v2 "fetch"
> command to another for ssh/git/file connections (but not for http). I
> think that's fixing a bug (but one nobody is likely to see, because it
> would imply the client sending different capabilities for each request).

I agree.

> I think we'd want something like the patch below.

Thanks for your patch! I have included it as the first patch in the
"part 2" patch series I am planning to send once this "part 1" will be
merged to pu or next:

- the commit with your patch:
https://gitlab.com/gitlab-org/gitlab-git/-/commit/458b79f0f563226bf50924553fc3889cb0942864
- the whole branch with "part 1" and "part 2":
https://gitlab.com/gitlab-org/gitlab-git/-/commits/fix-upload-pack-variable-scope5/

> Some of the other globals, like multi_ack, are really v0 only (since v2
> assumes certain baseline capabilities). We could either leave them
> as-is, or roll them into upload_pack_data and just let v2 code ignore
> them as it does now.

I am in favor of rolling them into upload_pack_data. That's what I
started doing in "part 1" and continued doing in "part 2". I think it
makes the code more coherent and cleaner.

Thanks for your review,
Christian.

  reply	other threads:[~2020-05-19  9:44 UTC|newest]

Thread overview: 108+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-15 10:04 [PATCH 00/13] upload-pack: use 'struct upload_pack_data' thoroughly, part 1 Christian Couder
2020-05-15 10:04 ` [PATCH 01/13] upload-pack: remove unused 'wants' from upload_pack_data Christian Couder
2020-05-15 18:03   ` Jeff King
2020-05-15 10:04 ` [PATCH 02/13] upload-pack: move {want,have}_obj to upload_pack_data Christian Couder
2020-05-15 18:05   ` Jeff King
2020-05-15 10:04 ` [PATCH 03/13] upload-pack: move 'struct upload_pack_data' around Christian Couder
2020-05-15 18:05   ` Jeff King
2020-05-15 10:04 ` [PATCH 04/13] upload-pack: use 'struct upload_pack_data' in upload_pack() Christian Couder
2020-05-15 10:30   ` Derrick Stolee
2020-05-15 18:13     ` Jeff King
2020-05-15 10:04 ` [PATCH 05/13] upload-pack: pass upload_pack_data to get_common_commits() Christian Couder
2020-05-15 18:17   ` Jeff King
2020-05-15 18:36     ` Jeff King
2020-05-15 10:04 ` [PATCH 06/13] upload-pack: pass upload_pack_data to receive_needs() Christian Couder
2020-05-15 18:20   ` Jeff King
2020-05-15 10:04 ` [PATCH 07/13] upload-pack: use upload_pack_data writer in receive_needs() Christian Couder
2020-05-15 18:23   ` Jeff King
2020-05-15 10:04 ` [PATCH 08/13] upload-pack: move symref to upload_pack_data Christian Couder
2020-05-15 18:28   ` Jeff King
2020-05-15 10:04 ` [PATCH 09/13] upload-pack: pass upload_pack_data to send_ref() Christian Couder
2020-05-15 18:33   ` Jeff King
2020-05-15 10:04 ` [PATCH 10/13] upload-pack: pass upload_pack_data to check_non_tip() Christian Couder
2020-05-15 10:04 ` [PATCH 11/13] upload-pack: remove static variable 'stateless_rpc' Christian Couder
2020-05-15 18:38   ` Jeff King
2020-05-15 10:04 ` [PATCH 12/13] upload-pack: pass upload_pack_data to create_pack_file() Christian Couder
2020-05-15 10:04 ` [PATCH 13/13] upload-pack: use upload_pack_data fields in receive_needs() Christian Couder
2020-05-15 18:42   ` Jeff King
2020-05-15 10:43 ` [PATCH 00/13] upload-pack: use 'struct upload_pack_data' thoroughly, part 1 Derrick Stolee
2020-05-19  9:49   ` Christian Couder
2020-05-15 18:47 ` Jeff King
2020-05-15 18:55   ` Jeff King
2020-05-19  9:44     ` Christian Couder [this message]
2020-05-27 16:47 ` [PATCH 00/12] upload-pack: use 'struct upload_pack_data' thoroughly, part 2 Christian Couder
2020-05-27 16:47   ` [PATCH 01/12] upload-pack: actually use some upload_pack_data bitfields Christian Couder
2020-05-27 16:47   ` [PATCH 02/12] upload-pack: move static vars to upload_pack_data Christian Couder
2020-05-27 18:06     ` Jeff King
2020-06-02  4:19       ` Christian Couder
2020-05-27 16:47   ` [PATCH 03/12] upload-pack: move use_sideband " Christian Couder
2020-05-27 18:07     ` Jeff King
2020-05-27 16:47   ` [PATCH 04/12] upload-pack: move filter_capability_requested " Christian Couder
2020-05-27 18:08     ` Jeff King
2020-05-27 16:47   ` [PATCH 05/12] upload-pack: move multi_ack " Christian Couder
2020-05-27 16:47   ` [PATCH 06/12] upload-pack: change multi_ack to an enum Christian Couder
2020-05-27 18:10     ` Jeff King
2020-05-27 16:47   ` [PATCH 07/12] upload-pack: pass upload_pack_data to upload_pack_config() Christian Couder
2020-05-27 18:36     ` Jeff King
2020-05-27 16:47   ` [PATCH 08/12] upload-pack: move keepalive to upload_pack_data Christian Couder
2020-05-27 18:38     ` Jeff King
2020-05-27 16:47   ` [PATCH 09/12] upload-pack: move allow_filter " Christian Couder
2020-05-27 18:39     ` Jeff King
2020-05-27 16:47   ` [PATCH 10/12] upload-pack: move allow_ref_in_want " Christian Couder
2020-05-27 18:41     ` Jeff King
2020-05-27 16:47   ` [PATCH 11/12] upload-pack: move allow_sideband_all " Christian Couder
2020-05-27 16:47   ` [PATCH 12/12] upload-pack: move pack_objects_hook " Christian Couder
2020-05-27 18:55     ` Jeff King
2020-05-27 18:57   ` [PATCH 00/12] upload-pack: use 'struct upload_pack_data' thoroughly, part 2 Jeff King
2020-05-27 20:41     ` Junio C Hamano
2020-06-02  4:16   ` [PATCH v2 00/13] " Christian Couder
2020-06-02  4:16     ` [PATCH v2 01/13] upload-pack: actually use some upload_pack_data bitfields Christian Couder
2020-06-02  4:16     ` [PATCH v2 02/13] upload-pack: annotate upload_pack_data fields Christian Couder
2020-06-02  4:16     ` [PATCH v2 03/13] upload-pack: move static vars to upload_pack_data Christian Couder
2020-06-02  6:59       ` Jeff King
2020-06-02  4:16     ` [PATCH v2 04/13] upload-pack: move use_sideband " Christian Couder
2020-06-02  4:16     ` [PATCH v2 05/13] upload-pack: move filter_capability_requested " Christian Couder
2020-06-02  4:16     ` [PATCH v2 06/13] upload-pack: move multi_ack " Christian Couder
2020-06-02  4:16     ` [PATCH v2 07/13] upload-pack: change multi_ack to an enum Christian Couder
2020-06-02  4:16     ` [PATCH v2 08/13] upload-pack: pass upload_pack_data to upload_pack_config() Christian Couder
2020-06-02  4:16     ` [PATCH v2 09/13] upload-pack: move keepalive to upload_pack_data Christian Couder
2020-06-02  4:16     ` [PATCH v2 10/13] upload-pack: move allow_filter " Christian Couder
2020-06-02  4:16     ` [PATCH v2 11/13] upload-pack: move allow_ref_in_want " Christian Couder
2020-06-02  4:16     ` [PATCH v2 12/13] upload-pack: move allow_sideband_all " Christian Couder
2020-06-02  4:16     ` [PATCH v2 13/13] upload-pack: move pack_objects_hook " Christian Couder
2020-06-02  7:08     ` [PATCH v2 00/13] upload-pack: use 'struct upload_pack_data' thoroughly, part 2 Jeff King
2020-06-02 17:24       ` Junio C Hamano
2020-06-02 19:05     ` [PATCH] fixup! upload-pack: change multi_ack to an enum Jonathan Tan
2020-06-02 19:28       ` Christian Couder
2020-06-04 17:54     ` [PATCH v3 00/13] upload-pack: use 'struct upload_pack_data' thoroughly, part 2 Christian Couder
2020-06-04 17:54       ` [PATCH v3 01/13] upload-pack: actually use some upload_pack_data bitfields Christian Couder
2020-06-04 17:54       ` [PATCH v3 02/13] upload-pack: annotate upload_pack_data fields Christian Couder
2020-06-04 17:54       ` [PATCH v3 03/13] upload-pack: move static vars to upload_pack_data Christian Couder
2020-06-04 17:54       ` [PATCH v3 04/13] upload-pack: move use_sideband " Christian Couder
2020-06-04 17:54       ` [PATCH v3 05/13] upload-pack: move filter_capability_requested " Christian Couder
2020-06-04 17:54       ` [PATCH v3 06/13] upload-pack: move multi_ack " Christian Couder
2020-06-04 17:54       ` [PATCH v3 07/13] upload-pack: change multi_ack to an enum Christian Couder
2020-06-04 17:54       ` [PATCH v3 08/13] upload-pack: pass upload_pack_data to upload_pack_config() Christian Couder
2020-06-04 17:54       ` [PATCH v3 09/13] upload-pack: move keepalive to upload_pack_data Christian Couder
2020-06-04 17:54       ` [PATCH v3 10/13] upload-pack: move allow_filter " Christian Couder
2020-06-04 17:54       ` [PATCH v3 11/13] upload-pack: move allow_ref_in_want " Christian Couder
2020-06-04 17:54       ` [PATCH v3 12/13] upload-pack: move allow_sideband_all " Christian Couder
2020-06-04 17:54       ` [PATCH v3 13/13] upload-pack: move pack_objects_hook " Christian Couder
2020-06-04 18:07       ` [PATCH v3 00/13] upload-pack: use 'struct upload_pack_data' thoroughly, part 2 Junio C Hamano
2020-06-05 10:38         ` Christian Couder
2020-06-11 12:05 ` [PATCH 00/14] upload-pack: use 'struct upload_pack_data' thoroughly, part 3 Christian Couder
2020-06-11 12:05   ` [PATCH 01/14] upload-pack: pass upload_pack_data to send_shallow_list() Christian Couder
2020-06-11 12:05   ` [PATCH 02/14] upload-pack: pass upload_pack_data to deepen() Christian Couder
2020-06-11 12:05   ` [PATCH 03/14] upload-pack: pass upload_pack_data to deepen_by_rev_list() Christian Couder
2020-06-11 12:05   ` [PATCH 04/14] upload-pack: pass upload_pack_data to send_unshallow() Christian Couder
2020-06-11 12:05   ` [PATCH 05/14] upload-pack: move shallow_nr to upload_pack_data Christian Couder
2020-06-11 12:05   ` [PATCH 06/14] upload-pack: move extra_edge_obj " Christian Couder
2020-06-11 12:05   ` [PATCH 07/14] upload-pack: move allow_unadvertised_object_request " Christian Couder
2020-06-11 12:05   ` [PATCH 08/14] upload-pack: change allow_unadvertised_object_request to an enum Christian Couder
2020-06-11 12:05   ` [PATCH 09/14] upload-pack: pass upload_pack_data to process_haves() Christian Couder
2020-06-11 12:05   ` [PATCH 10/14] upload-pack: pass upload_pack_data to send_acks() Christian Couder
2020-06-11 12:05   ` [PATCH 11/14] upload-pack: pass upload_pack_data to ok_to_give_up() Christian Couder
2020-06-11 12:05   ` [PATCH 12/14] upload-pack: pass upload_pack_data to got_oid() Christian Couder
2020-06-11 12:05   ` [PATCH 13/14] upload-pack: move oldest_have to upload_pack_data Christian Couder
2020-06-11 12:05   ` [PATCH 14/14] upload-pack: refactor common code into do_got_oid() Christian Couder
2020-06-11 20:04   ` [PATCH 00/14] upload-pack: use 'struct upload_pack_data' thoroughly, part 3 Jonathan Tan

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='CAP8UFD1JndLk=cxguLuwv+hV5-TdNrr+oT4wJ4bBhhCHe9JM4w@mail.gmail.com' \
    --to=christian.couder@gmail.com \
    --cc=chriscool@tuxfamily.org \
    --cc=dstolee@microsoft.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jonathantanmy@google.com \
    --cc=jrnieder@gmail.com \
    --cc=me@ttaylorr.com \
    --cc=peff@peff.net \
    /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.