<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/http-backend.c, branch v2.20.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.20.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.20.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2018-09-17T20:53:50Z</updated>
<entry>
<title>Merge branch 'ds/multi-pack-index'</title>
<updated>2018-09-17T20:53:50Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-09-17T20:53:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=49f210fd5279eeb0106cd7e4383a1c4454d30428'/>
<id>urn:sha1:49f210fd5279eeb0106cd7e4383a1c4454d30428</id>
<content type='text'>
When there are too many packfiles in a repository (which is not
recommended), looking up an object in these would require
consulting many pack .idx files; a new mechanism to have a single
file that consolidates all of these .idx files is introduced.

* ds/multi-pack-index: (32 commits)
  pack-objects: consider packs in multi-pack-index
  midx: test a few commands that use get_all_packs
  treewide: use get_all_packs
  packfile: add all_packs list
  midx: fix bug that skips midx with alternates
  midx: stop reporting garbage
  midx: mark bad packed objects
  multi-pack-index: store local property
  multi-pack-index: provide more helpful usage info
  midx: clear midx on repack
  packfile: skip loading index if in multi-pack-index
  midx: prevent duplicate packfile loads
  midx: use midx in approximate_object_count
  midx: use existing midx when writing new one
  midx: use midx in abbreviation calculations
  midx: read objects from multi-pack-index
  config: create core.multiPackIndex setting
  midx: write object offsets
  midx: write object id fanout chunk
  midx: write object ids in a chunk
  ...
</content>
</entry>
<entry>
<title>Merge branch 'mk/http-backend-content-length'</title>
<updated>2018-09-10T17:35:42Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-09-10T17:29:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fe468efff533c3c92c174ae4706532c1521c150c'/>
<id>urn:sha1:fe468efff533c3c92c174ae4706532c1521c150c</id>
<content type='text'>
The earlier attempt barfed when given a CONTENT_LENGTH that is
set to an empty string.  RFC 3875 is fairly clear that in this
case we should not read any message body, but we've been reading
through to the EOF in previous versions (which did not even pay
attention to the environment variable), so keep that behaviour for
now in this late update.

* mk/http-backend-content-length:
  http-backend: allow empty CONTENT_LENGTH
</content>
</entry>
<entry>
<title>http-backend: allow empty CONTENT_LENGTH</title>
<updated>2018-09-07T19:35:51Z</updated>
<author>
<name>Max Kirillov</name>
<email>max@max630.net</email>
</author>
<published>2018-09-07T03:36:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=574c513e8dda5598e9e08e8ca2a048bf120a5709'/>
<id>urn:sha1:574c513e8dda5598e9e08e8ca2a048bf120a5709</id>
<content type='text'>
According to RFC3875, empty environment variable is equivalent to unset,
and for CONTENT_LENGTH it should mean zero body to read.

However, unset CONTENT_LENGTH is also used for chunked encoding to indicate
reading until EOF. At least, the test "large fetch-pack requests can be split
across POSTs" from t5551 starts faliing, if unset or empty CONTENT_LENGTH is
treated as zero length body. So keep the existing behavior as much as possible.

Add a test for the case.

Reported-By: Jelmer Vernooĳ &lt;jelmer@jelmer.uk&gt;
Signed-off-by: Max Kirillov &lt;max@max630.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>treewide: use get_all_packs</title>
<updated>2018-08-20T22:31:40Z</updated>
<author>
<name>Derrick Stolee</name>
<email>dstolee@microsoft.com</email>
</author>
<published>2018-08-20T16:52:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=454ea2e4d7036862e8b2f69ef2dea640f8787510'/>
<id>urn:sha1:454ea2e4d7036862e8b2f69ef2dea640f8787510</id>
<content type='text'>
There are many places in the codebase that want to iterate over
all packfiles known to Git. The purposes are wide-ranging, and
those that can take advantage of the multi-pack-index already
do. So, use get_all_packs() instead of get_packed_git() to be
sure we are iterating over all packfiles.

Signed-off-by: Derrick Stolee &lt;dstolee@microsoft.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'mk/http-backend-content-length'</title>
<updated>2018-08-17T20:09:57Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-08-17T20:09:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c5d276cb184cc42fb90b60b14996253b855a3e06'/>
<id>urn:sha1:c5d276cb184cc42fb90b60b14996253b855a3e06</id>
<content type='text'>
The http-backend (used for smart-http transport) used to slurp the
whole input until EOF, without paying attention to CONTENT_LENGTH
that is supplied in the environment and instead expecting the Web
server to close the input stream.  This has been fixed.

* mk/http-backend-content-length:
  t5562: avoid non-portable "export FOO=bar" construct
  http-backend: respect CONTENT_LENGTH for receive-pack
  http-backend: respect CONTENT_LENGTH as specified by rfc3875
  http-backend: cleanup writing to child process
</content>
</entry>
<entry>
<title>http-backend: respect CONTENT_LENGTH for receive-pack</title>
<updated>2018-07-27T17:47:52Z</updated>
<author>
<name>Max Kirillov</name>
<email>max@max630.net</email>
</author>
<published>2018-07-27T03:48:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6c213e863aeb0af078bf82deefb22da20427c2ab'/>
<id>urn:sha1:6c213e863aeb0af078bf82deefb22da20427c2ab</id>
<content type='text'>
Push passes to another commands, as described in
https://public-inbox.org/git/20171129032214.GB32345@sigill.intra.peff.net/

As it gets complicated to correctly track the data length, instead transfer
the data through parent process and cut the pipe as the specified length is
reached. Do it only when CONTENT_LENGTH is set, otherwise pass the input
directly to the forked commands.

Add tests for cases:

* CONTENT_LENGTH is set, script's stdin has more data, with all combinations
  of variations: fetch or push, plain or compressed body, correct or truncated
  input.

* CONTENT_LENGTH is specified to a value which does not fit into ssize_t.

Helped-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Signed-off-by: Max Kirillov &lt;max@max630.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>tag: add repository argument to deref_tag</title>
<updated>2018-06-29T17:43:39Z</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2018-06-29T01:22:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a74093da5ed601a09fa158e5ba6f6f14c1142a3e'/>
<id>urn:sha1:a74093da5ed601a09fa158e5ba6f6f14c1142a3e</id>
<content type='text'>
Add a repository argument to allow the callers of deref_tag
to be more specific about which repository to act on. This is a small
mechanical change; it doesn't change the implementation to handle
repositories other than the_repository yet.

As with the previous commits, use a macro to catch callers passing a
repository other than the_repository at compile time.

Signed-off-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>object: add repository argument to parse_object</title>
<updated>2018-06-29T17:43:38Z</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2018-06-29T01:21:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=109cd76dd3467bd05f8d2145b857006649741d5c'/>
<id>urn:sha1:109cd76dd3467bd05f8d2145b857006649741d5c</id>
<content type='text'>
Add a repository argument to allow the callers of parse_object
to be more specific about which repository to act on. This is a small
mechanical change; it doesn't change the implementation to handle
repositories other than the_repository yet.

As with the previous commits, use a macro to catch callers passing a
repository other than the_repository at compile time.

Signed-off-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>http-backend: respect CONTENT_LENGTH as specified by rfc3875</title>
<updated>2018-06-11T20:21:38Z</updated>
<author>
<name>Max Kirillov</name>
<email>max@max630.net</email>
</author>
<published>2018-06-10T15:05:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c79edf73f4b018310428632887f9ce2ce32d839a'/>
<id>urn:sha1:c79edf73f4b018310428632887f9ce2ce32d839a</id>
<content type='text'>
http-backend reads whole input until EOF. However, the RFC 3875 specifies
that a script must read only as many bytes as specified by CONTENT_LENGTH
environment variable. Web server may exercise the specification by not closing
the script's standard input after writing content. In that case http-backend
would hang waiting for the input. The issue is known to happen with
IIS/Windows, for example.

Make http-backend read only CONTENT_LENGTH bytes, if it's defined, rather than
the whole input until EOF. If the variable is not defined, keep older behavior
of reading until EOF because it is used to support chunked transfer-encoding.

This commit only fixes buffered input, whcih reads whole body before
processign it. Non-buffered input is going to be fixed in subsequent commit.

Signed-off-by: Florian Manschwetus &lt;manschwetus@cs-software-gmbh.de&gt;
[mk: fixed trivial build failures and polished style issues]
Helped-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Signed-off-by: Max Kirillov &lt;max@max630.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>http-backend: cleanup writing to child process</title>
<updated>2018-06-11T20:21:36Z</updated>
<author>
<name>Max Kirillov</name>
<email>max@max630.net</email>
</author>
<published>2018-06-10T15:05:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6b1fae1dfbbdb6dc352567c0fc45a9e87474192d'/>
<id>urn:sha1:6b1fae1dfbbdb6dc352567c0fc45a9e87474192d</id>
<content type='text'>
As explained in [1], we should not assume the reason why the writing has
failed, and even if the reason is that child has existed not the reason
why it have done so. So instead just say that writing has failed.

[1] https://public-inbox.org/git/20180604044408.GD14451@sigill.intra.peff.net/

Signed-off-by: Max Kirillov &lt;max@max630.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
