<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/upload-pack.c, branch v2.29.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.29.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.29.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2020-08-24T21:54:31Z</updated>
<entry>
<title>Merge branch 'rs/more-buffered-io'</title>
<updated>2020-08-24T21:54:31Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-08-24T21:54:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d8488b9e86f241ba313d04091449869fb15154d6'/>
<id>urn:sha1:d8488b9e86f241ba313d04091449869fb15154d6</id>
<content type='text'>
Use more buffered I/O where we used to call many small write(2)s.

* rs/more-buffered-io:
  upload-pack: use buffered I/O to talk to rev-list
  midx: use buffered I/O to talk to pack-objects
  connected: use buffered I/O to talk to rev-list
</content>
</entry>
<entry>
<title>Merge branch 'rs/upload-pack-sigchain-fix'</title>
<updated>2020-08-19T23:14:45Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-08-19T23:14:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f577d305c7c24c99e62a88f78d781cb8cb6d0bd6'/>
<id>urn:sha1:f577d305c7c24c99e62a88f78d781cb8cb6d0bd6</id>
<content type='text'>
Code clean-up.

* rs/upload-pack-sigchain-fix:
  upload-pack: remove superfluous sigchain_pop() call
</content>
</entry>
<entry>
<title>upload-pack: use buffered I/O to talk to rev-list</title>
<updated>2020-08-17T17:29:39Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2020-08-12T16:52:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a698d67b08f98ddac0e6df898fbfab5b4fbd36b1'/>
<id>urn:sha1:a698d67b08f98ddac0e6df898fbfab5b4fbd36b1</id>
<content type='text'>
Like f0bca72dc77 (send-pack: use buffered I/O to talk to pack-objects,
2016-06-08), significantly reduce the number of system calls and
simplify the code for sending object IDs to rev-list by using stdio's
buffering.

Take care to handle errors immediately to get the correct error code,
and to flush the buffer explicitly before closing the stream in order to
catch any write errors for these last bytes.

Helped-by: Chris Torek &lt;chris.torek@gmail.com&gt;
Helped-by: Johannes Sixt &lt;j6t@kdbg.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'tb/upload-pack-filters'</title>
<updated>2020-08-12T01:04:13Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-08-12T01:04:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=73a925516604df7a95ad69b8d650275eb4ab270f'/>
<id>urn:sha1:73a925516604df7a95ad69b8d650275eb4ab270f</id>
<content type='text'>
The component to respond to "git fetch" request is made more
configurable to selectively allow or reject object filtering
specification used for partial cloning.

* tb/upload-pack-filters:
  t5616: use test_i18ngrep for upload-pack errors
  upload-pack.c: introduce 'uploadpackfilter.tree.maxDepth'
  upload-pack.c: allow banning certain object filter(s)
  list_objects_filter_options: introduce 'list_object_filter_config_name'
</content>
</entry>
<entry>
<title>upload-pack: remove superfluous sigchain_pop() call</title>
<updated>2020-08-11T21:01:18Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2020-08-11T17:15:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e767963ab6a542649c91f79fb686c58574b1ee86'/>
<id>urn:sha1:e767963ab6a542649c91f79fb686c58574b1ee86</id>
<content type='text'>
2997178ee6 (upload-pack: split check_unreachable() in two, prep for
get_reachable_list(), 2016-06-12) moved most code of has_unreachable()
into the new function do_reachable_revlist().  The latter takes care to
ignore SIGPIPE during its operations, and restores the original signal
handler before returning.

However, a sigchain_pop(SIGPIPE) call remained in the error handling
code of has_unreachable(), which does nothing because the stack is
empty after do_reachable_revlist() cleaned up after itself.  Remove it.

Signed-off-by: René Scharfe &lt;l.s.r@web.de&gt;
Reviewed-by: Taylor Blau &lt;me@ttaylorr.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jk/strvec'</title>
<updated>2020-08-10T17:23:57Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-08-10T17:23:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=46b225f15308c8f77379f864189bed95c273d29f'/>
<id>urn:sha1:46b225f15308c8f77379f864189bed95c273d29f</id>
<content type='text'>
The argv_array API is useful for not just managing argv but any
"vector" (NULL-terminated array) of strings, and has seen adoption
to a certain degree.  It has been renamed to "strvec" to reduce the
barrier to adoption.

* jk/strvec:
  strvec: rename struct fields
  strvec: drop argv_array compatibility layer
  strvec: update documention to avoid argv_array
  strvec: fix indentation in renamed calls
  strvec: convert remaining callers away from argv_array name
  strvec: convert more callers away from argv_array name
  strvec: convert builtin/ callers away from argv_array name
  quote: rename sq_dequote_to_argv_array to mention strvec
  strvec: rename files from argv-array to strvec
  argv-array: rename to strvec
  argv-array: use size_t for count and alloc
</content>
</entry>
<entry>
<title>upload-pack.c: introduce 'uploadpackfilter.tree.maxDepth'</title>
<updated>2020-08-04T01:03:46Z</updated>
<author>
<name>Taylor Blau</name>
<email>me@ttaylorr.com</email>
</author>
<published>2020-08-03T18:00:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5b01a4e8ff19fa9797a67b53df2db0a1a574fe81'/>
<id>urn:sha1:5b01a4e8ff19fa9797a67b53df2db0a1a574fe81</id>
<content type='text'>
In b79cf959b2 (upload-pack.c: allow banning certain object filter(s),
2020-02-26), we introduced functionality to disallow certain object
filters from being chosen from within 'git upload-pack'. Traditionally,
administrators use this functionality to disallow filters that are known
to perform slowly, for e.g., those that do not have bitmap-level
filtering.

In the past, the '--filter=tree:&lt;n&gt;' was one such filter that does not
have bitmap-level filtering support, and so was likely to be banned by
administrators.

However, in the previous couple of commits, we introduced bitmap-level
filtering for the case when 'n' is equal to '0', i.e., as if we had a
'--filter=tree:none' choice.

While it would be sufficient to simply write

  $ git config uploadpackfilter.tree.allow true

(since it would allow all values of 'n'), we would like to be able to
allow this filter for certain values of 'n', i.e., those no greater than
some pre-specified maximum.

In order to do this, introduce a new configuration key, as follows:

  $ git config uploadpackfilter.tree.maxDepth &lt;m&gt;

where '&lt;m&gt;' specifies the maximum allowed value of 'n' in the filter
'tree:n'. Administrators who wish to allow for only the value '0' can
write:

  $ git config uploadpackfilter.tree.allow true
  $ git config uploadpackfilter.tree.maxDepth 0

which allows '--filter=tree:0', but no other values.

Signed-off-by: Taylor Blau &lt;me@ttaylorr.com&gt;
Acked-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>upload-pack.c: allow banning certain object filter(s)</title>
<updated>2020-08-04T01:03:41Z</updated>
<author>
<name>Taylor Blau</name>
<email>me@ttaylorr.com</email>
</author>
<published>2020-08-03T18:00:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6dd3456a8ccbad6a0a6a31bc7192025617114243'/>
<id>urn:sha1:6dd3456a8ccbad6a0a6a31bc7192025617114243</id>
<content type='text'>
Git clients may ask the server for a partial set of objects, where the
set of objects being requested is refined by one or more object filters.
Server administrators can configure 'git upload-pack' to allow or ban
these filters by setting the 'uploadpack.allowFilter' variable to
'true' or 'false', respectively.

However, administrators using bitmaps may wish to allow certain kinds of
object filters, but ban others. Specifically, they may wish to allow
object filters that can be optimized by the use of bitmaps, while
rejecting other object filters which aren't and represent a perceived
performance degradation (as well as an increased load factor on the
server).

Allow configuring 'git upload-pack' to support object filters on a
case-by-case basis by introducing two new configuration variables:

  - 'uploadpackfilter.allow'
  - 'uploadpackfilter.&lt;kind&gt;.allow'

where '&lt;kind&gt;' may be one of 'blobNone', 'blobLimit', 'tree', and so on.

Setting the second configuration variable for any valid value of
'&lt;kind&gt;' explicitly allows or disallows restricting that kind of object
filter.

If a client requests the object filter &lt;kind&gt; and the respective
configuration value is not set, 'git upload-pack' will default to the
value of 'uploadpackfilter.allow', which itself defaults to 'true' to
maintain backwards compatibility. Note that this differs from
'uploadpack.allowfilter', which controls whether or not the 'filter'
capability is advertised.

Helped-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Taylor Blau &lt;me@ttaylorr.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>strvec: rename struct fields</title>
<updated>2020-07-31T02:18:06Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2020-07-29T00:37:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d70a9eb611a9d242c1d26847d223b8677609305b'/>
<id>urn:sha1:d70a9eb611a9d242c1d26847d223b8677609305b</id>
<content type='text'>
The "argc" and "argv" names made sense when the struct was argv_array,
but now they're just confusing. Let's rename them to "nr" (which we use
for counts elsewhere) and "v" (which is rather terse, but reads well
when combined with typical variable names like "args.v").

Note that we have to update all of the callers immediately. Playing
tricks with the preprocessor is hard here, because we wouldn't want to
rewrite unrelated tokens.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>strvec: fix indentation in renamed calls</title>
<updated>2020-07-28T22:02:18Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2020-07-28T20:26:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f6d8942b1fc6c968980c8ae03054d7b2114b4415'/>
<id>urn:sha1:f6d8942b1fc6c968980c8ae03054d7b2114b4415</id>
<content type='text'>
Code which split an argv_array call across multiple lines, like:

  argv_array_pushl(&amp;args, "one argument",
                   "another argument", "and more",
		   NULL);

was recently mechanically renamed to use strvec, which results in
mis-matched indentation like:

  strvec_pushl(&amp;args, "one argument",
                   "another argument", "and more",
		   NULL);

Let's fix these up to align the arguments with the opening paren. I did
this manually by sifting through the results of:

  git jump grep 'strvec_.*,$'

and liberally applying my editor's auto-format. Most of the changes are
of the form shown above, though I also normalized a few that had
originally used a single-tab indentation (rather than our usual style of
aligning with the open paren). I also rewrapped a couple of obvious
cases (e.g., where previously too-long lines became short enough to fit
on one), but I wasn't aggressive about it. In cases broken to three or
more lines, the grouping of arguments is sometimes meaningful, and it
wasn't worth my time or reviewer time to ponder each case individually.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
