All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Tan <jonathantanmy@google.com>
To: git@vger.kernel.org
Cc: Jonathan Tan <jonathantanmy@google.com>, bmwill@google.com
Subject: [PATCH v2 0/3] Supporting partial clones in protocol v2
Date: Tue,  1 May 2018 17:31:28 -0700	[thread overview]
Message-ID: <cover.1525220786.git.jonathantanmy@google.com> (raw)
In-Reply-To: <cover.1525213052.git.jonathantanmy@google.com>

> This is a bit difficult to read and there is no reason why we would need
> to read the entire upload_pack_config to determine if we need to filter
> things (we will need to read the config if cmd "fetch" is requested
> though).  Instead it may be better to do the following:
> 
>   if (value) {
>     strbuf_addstr(value, "shallow");
>     if (repo_config_get(r, "uplaodpack.filter"))
>       strbuf_addstr(value, " filter");
>   }
> 
> This way its easier to read and you only are reading the required value
> from the config.

Thanks, Brandon. I went ahead and used repo_config_get_bool(), and
indeed it works.

Removing the call to git_config() from there exposed another issue in
that configs were not read if upload-pack was used with protocol v2, so
I inserted a patch in the middle addressing that. While writing that
patch, I noticed that uploadpack.packobjectshook couldn't take filenames
with spaces, which I think is due to prepare_shell_cmd() in
run-command.c not quoting properly. Adding single quotes around "%s"
worked, but made other tests fail. Instead of continuing down that
rabbit hole, I just made the uploadpack.packobjectshook not have any
spaces, just like in t5544.

Jonathan Tan (3):
  upload-pack: fix error message typo
  upload-pack: read config when serving protocol v2
  {fetch,upload}-pack: support filter in protocol v2

 Documentation/technical/protocol-v2.txt |   9 ++
 fetch-pack.c                            |  23 ++++-
 t/t5701-git-serve.sh                    |  14 +++
 t/t5702-protocol-v2.sh                  | 112 ++++++++++++++++++++++++
 upload-pack.c                           |  19 +++-
 5 files changed, 171 insertions(+), 6 deletions(-)

-- 
2.17.0.441.gb46fe60e1d-goog


  parent reply	other threads:[~2018-05-02  0:31 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-01 22:22 [PATCH 0/2] Supporting partial clones in protocol v2 Jonathan Tan
2018-05-01 22:22 ` [PATCH 1/2] upload-pack: fix error message typo Jonathan Tan
2018-05-01 22:25   ` Jonathan Tan
2018-05-01 22:22 ` [PATCH 2/2] {fetch,upload}-pack: support filter in protocol v2 Jonathan Tan
2018-05-01 22:36   ` Brandon Williams
2018-05-02  0:31 ` Jonathan Tan [this message]
2018-05-02  0:31   ` [PATCH v2 1/3] upload-pack: fix error message typo Jonathan Tan
2018-05-03 18:58     ` Stefan Beller
2018-05-03 23:41       ` Jonathan Tan
2018-05-04  2:24         ` Junio C Hamano
2018-05-04 16:10           ` Jonathan Tan
2018-05-02  0:31   ` [PATCH v2 2/3] upload-pack: read config when serving protocol v2 Jonathan Tan
2018-05-03 19:08     ` Stefan Beller
2018-05-03 23:45       ` Jonathan Tan
2018-05-02  0:31   ` [PATCH v2 3/3] {fetch,upload}-pack: support filter in " Jonathan Tan
2018-05-03 20:15     ` Stefan Beller
2018-05-03 23:46 ` [PATCH v3 0/3] Supporting partial clones " Jonathan Tan
2018-05-03 23:46   ` [PATCH v3 1/3] upload-pack: fix error message typo Jonathan Tan
2018-05-03 23:46   ` [PATCH v3 2/3] upload-pack: read config when serving protocol v2 Jonathan Tan
2018-05-03 23:46   ` [PATCH v3 3/3] {fetch,upload}-pack: support filter in " 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=cover.1525220786.git.jonathantanmy@google.com \
    --to=jonathantanmy@google.com \
    --cc=bmwill@google.com \
    --cc=git@vger.kernel.org \
    /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.