<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/upload-pack.c, branch v2.21.4</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.21.4</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.21.4'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2019-02-05T22:26:11Z</updated>
<entry>
<title>Merge branch 'jt/fetch-v2-sideband'</title>
<updated>2019-02-05T22:26:11Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-02-05T22:26:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5f8b86db94e789bc07258f98cc5ba25d18273d83'/>
<id>urn:sha1:5f8b86db94e789bc07258f98cc5ba25d18273d83</id>
<content type='text'>
"git fetch" and "git upload-pack" learned to send all exchange over
the sideband channel while talking the v2 protocol.

* jt/fetch-v2-sideband:
  tests: define GIT_TEST_SIDEBAND_ALL
  {fetch,upload}-pack: sideband v2 fetch response
  sideband: reverse its dependency on pkt-line
  pkt-line: introduce struct packet_writer
  pack-protocol.txt: accept error packets in any context
  Use packet_reader instead of packet_read_line
</content>
</entry>
<entry>
<title>Merge branch 'js/filter-options-should-use-plain-int'</title>
<updated>2019-02-05T22:26:10Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-02-05T22:26:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=073312b4c7a15d484d2ffdc2eb4a406df9cf9c55'/>
<id>urn:sha1:073312b4c7a15d484d2ffdc2eb4a406df9cf9c55</id>
<content type='text'>
Update the protocol message specification to allow only the limited
use of scaled quantities.  This is ensure potential compatibility
issues will not go out of hand.

* js/filter-options-should-use-plain-int:
  filter-options: expand scaled numbers
  tree:&lt;depth&gt;: skip some trees even when collecting omits
  list-objects-filter: teach tree:# how to handle &gt;0
</content>
</entry>
<entry>
<title>tests: define GIT_TEST_SIDEBAND_ALL</title>
<updated>2019-01-17T19:25:07Z</updated>
<author>
<name>Jonathan Tan</name>
<email>jonathantanmy@google.com</email>
</author>
<published>2019-01-16T19:28:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=07c3c2aa16370fd97551b7d1aa6af3d051e7cf8f'/>
<id>urn:sha1:07c3c2aa16370fd97551b7d1aa6af3d051e7cf8f</id>
<content type='text'>
Define a GIT_TEST_SIDEBAND_ALL environment variable meant to be used
from tests. When set to true, this overrides uploadpack.allowsidebandall
to true, allowing the entire test suite to be run as if this
configuration is in place for all repositories.

As of this patch, all tests pass whether GIT_TEST_SIDEBAND_ALL is unset
or set to 1.

Signed-off-by: Jonathan Tan &lt;jonathantanmy@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>{fetch,upload}-pack: sideband v2 fetch response</title>
<updated>2019-01-17T19:25:07Z</updated>
<author>
<name>Jonathan Tan</name>
<email>jonathantanmy@google.com</email>
</author>
<published>2019-01-16T19:28:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0bbc0bc5745ab8b294a5faf8c3b1d939ae8b6d10'/>
<id>urn:sha1:0bbc0bc5745ab8b294a5faf8c3b1d939ae8b6d10</id>
<content type='text'>
Currently, a response to a fetch request has sideband support only while
the packfile is being sent, meaning that the server cannot send notices
until the start of the packfile.

Extend sideband support in protocol v2 fetch responses to the whole
response. upload-pack will advertise it if the
uploadpack.allowsidebandall configuration variable is set, and
fetch-pack will automatically request it if advertised.

If the sideband is to be used throughout the whole response, upload-pack
will use it to send errors instead of prefixing a PKT-LINE payload with
"ERR ".

This will be tested in a subsequent patch.

Signed-off-by: Jonathan Tan &lt;jonathantanmy@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>filter-options: expand scaled numbers</title>
<updated>2019-01-15T23:42:31Z</updated>
<author>
<name>Josh Steadmon</name>
<email>steadmon@google.com</email>
</author>
<published>2019-01-08T00:17:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=87c2d9d3102e6c388f2d29f1bdb0b3a222d9a707'/>
<id>urn:sha1:87c2d9d3102e6c388f2d29f1bdb0b3a222d9a707</id>
<content type='text'>
When communicating with a remote server or a subprocess, use
expanded numbers rather than numbers with scaling suffix in the
object filter spec (e.g.  "limit:blob=1k" becomes
"limit:blob=1024").

Update the protocol docs to note that clients should always perform this
expansion, to allow for more compatibility between server
implementations.

Signed-off-by: Josh Steadmon &lt;steadmon@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>pkt-line: introduce struct packet_writer</title>
<updated>2019-01-15T19:44:48Z</updated>
<author>
<name>Jonathan Tan</name>
<email>jonathantanmy@google.com</email>
</author>
<published>2019-01-15T19:40:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bc2e795cea607e444a9f985b0dbed5a4d25921c8'/>
<id>urn:sha1:bc2e795cea607e444a9f985b0dbed5a4d25921c8</id>
<content type='text'>
A future patch will allow the client to request multiplexing of the
entire fetch response (and not only during packfile transmission), which
in turn allows the server to send progress and keepalive messages at any
time during the response.

It will be convenient for a future patch if writing options
(specifically, whether the written data is to be multiplexed) could be
controlled from a single place, so create struct packet_writer to serve
as that place, and modify upload-pack to use it.

Currently, it only stores the output fd, but a subsequent patch will (as
described above) introduce an option to determine if the written data is
to be multiplexed.

Signed-off-by: Jonathan Tan &lt;jonathantanmy@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>upload-pack: teach deepen-relative in protocol v2</title>
<updated>2019-01-10T22:53:49Z</updated>
<author>
<name>Jonathan Tan</name>
<email>jonathantanmy@google.com</email>
</author>
<published>2018-12-18T21:24:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5056cf4a62338c013a723e37cbe1f525f1dcc29d'/>
<id>urn:sha1:5056cf4a62338c013a723e37cbe1f525f1dcc29d</id>
<content type='text'>
Commit 685fbd3291 ("fetch-pack: perform a fetch using v2", 2018-03-15)
attempted to teach Git deepen-relative in protocol v2 (among other
things), but it didn't work:

 (1) fetch-pack.c needs to emit "deepen-relative".
 (2) upload-pack.c needs to ensure that the correct deepen_relative
     variable is passed to deepen() (there are two - the static variable
     and the one in struct upload_pack_data).
 (3) Before deepen() computes the list of reachable shallows, it first
     needs to mark all "our" refs as OUR_REF. v2 currently does not do
     this, because unlike v0, it is not needed otherwise.

Fix all this and include a test demonstrating that it works now. For
(2), the static variable deepen_relative is also eliminated, removing a
source of confusion.

Signed-off-by: Jonathan Tan &lt;jonathantanmy@google.com&gt;
Reviewed-by: Josh Steadmon &lt;steadmon@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>pack-protocol.txt: accept error packets in any context</title>
<updated>2019-01-02T21:05:30Z</updated>
<author>
<name>Masaya Suzuki</name>
<email>masayasuzuki@google.com</email>
</author>
<published>2018-12-29T21:19:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2d103c31c2cfcf03ff1408d639043469b0c93f70'/>
<id>urn:sha1:2d103c31c2cfcf03ff1408d639043469b0c93f70</id>
<content type='text'>
In the Git pack protocol definition, an error packet may appear only in
a certain context. However, servers can face a runtime error (e.g. I/O
error) at an arbitrary timing. This patch changes the protocol to allow
an error packet to be sent instead of any packet.

Without this protocol spec change, when a server cannot process a
request, there's no way to tell that to a client. Since the server
cannot produce a valid response, it would be forced to cut a connection
without telling why. With this protocol spec change, the server can be
more gentle in this situation. An old client may see these error packets
as an unexpected packet, but this is not worse than having an unexpected
EOF.

Following this protocol spec change, the error packet handling code is
moved to pkt-line.c. Implementation wise, this implementation uses
pkt-line to communicate with a subprocess. Since this is not a part of
Git protocol, it's possible that a packet that is not supposed to be an
error packet is mistakenly parsed as an error packet. This error packet
handling is enabled only for the Git pack protocol parsing code
considering this.

Signed-off-by: Masaya Suzuki &lt;masayasuzuki@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Use packet_reader instead of packet_read_line</title>
<updated>2019-01-02T21:05:27Z</updated>
<author>
<name>Masaya Suzuki</name>
<email>masayasuzuki@google.com</email>
</author>
<published>2018-12-29T21:19:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=01f9ec64c8a82a05ba7e5a17b292ede037a469ea'/>
<id>urn:sha1:01f9ec64c8a82a05ba7e5a17b292ede037a469ea</id>
<content type='text'>
By using and sharing a packet_reader while handling a Git pack protocol
request, the same reader option is used throughout the code. This makes
it easy to set a reader option to the request parsing code.

Signed-off-by: Masaya Suzuki &lt;masayasuzuki@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jt/upload-pack-v2-fix-shallow'</title>
<updated>2018-11-06T06:50:19Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-11-06T06:50:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3df27e0e34a634efd0aa842bc49030393deed673'/>
<id>urn:sha1:3df27e0e34a634efd0aa842bc49030393deed673</id>
<content type='text'>
"git fetch" over protocol v2 into a shallow repository failed to
fetch full history behind a new tip of history that was diverged
before the cut-off point of the history that was previously fetched
shallowly.

* jt/upload-pack-v2-fix-shallow:
  upload-pack: clear flags before each v2 request
  upload-pack: make want_obj not global
  upload-pack: make have_obj not global
</content>
</entry>
</feed>
