]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'jv/upload-pack-filter-spec-quotefix'
authorJunio C Hamano <gitster@pobox.com>
Fri, 12 Feb 2021 22:21:04 +0000 (14:21 -0800)
committerJunio C Hamano <gitster@pobox.com>
Fri, 12 Feb 2021 22:21:04 +0000 (14:21 -0800)
Fix in passing custom args from "git clone" to "upload-pack" on the
other side.

* jv/upload-pack-filter-spec-quotefix:
  t5544: clarify 'hook works with partial clone' test
  upload-pack.c: fix filter spec quoting bug

1  2 
upload-pack.c

diff --combined upload-pack.c
index 4ab55ce2b594ded6f46a90efc31f87aa6f435b2d,eae1fdbc550b82389a764780109e1bc1b0214a63..abadc930132dcbc3cd1db74c7b5b6630e2fa4f47
@@@ -305,14 -305,7 +305,7 @@@ static void create_pack_file(struct upl
        if (pack_data->filter_options.choice) {
                const char *spec =
                        expand_list_objects_filter_spec(&pack_data->filter_options);
-               if (pack_objects.use_shell) {
-                       struct strbuf buf = STRBUF_INIT;
-                       sq_quote_buf(&buf, spec);
-                       strvec_pushf(&pack_objects.args, "--filter=%s", buf.buf);
-                       strbuf_release(&buf);
-               } else {
-                       strvec_pushf(&pack_objects.args, "--filter=%s", spec);
-               }
+               strvec_pushf(&pack_objects.args, "--filter=%s", spec);
        }
        if (uri_protocols) {
                for (i = 0; i < uri_protocols->nr; i++)
@@@ -1232,7 -1225,7 +1225,7 @@@ static int send_ref(const char *refname
                packet_write_fmt(1, "%s %s\n", oid_to_hex(oid), refname_nons);
        }
        capabilities = NULL;
 -      if (!peel_ref(refname, &peeled))
 +      if (!peel_iterated_oid(oid, &peeled))
                packet_write_fmt(1, "%s %s^{}\n", oid_to_hex(&peeled), refname_nons);
        return 0;
  }