<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/fetch-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-07T06:05:30Z</updated>
<entry>
<title>Merge branch 'bc/fetch-pack-clear-alternate-shallow'</title>
<updated>2019-02-07T06:05:30Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-02-07T06:05:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8f0f46539a8c557985241f3aec7a12bd5f2634c2'/>
<id>urn:sha1:8f0f46539a8c557985241f3aec7a12bd5f2634c2</id>
<content type='text'>
"git fetch" over protocol v2 that needs to make a second connection
to backfill tags did not clear a variable that holds shallow
repository information correctly, leading to an access of freed
piece of memory.

* bc/fetch-pack-clear-alternate-shallow:
  fetch-pack: clear alternate shallow in one more place
  fetch-pack: clear alternate shallow when complete
</content>
</entry>
<entry>
<title>fetch-pack: clear alternate shallow in one more place</title>
<updated>2019-02-07T02:50:49Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2019-02-06T23:59:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=380ebab209bc444e7a8ed0e914a4c6d7440b1d29'/>
<id>urn:sha1:380ebab209bc444e7a8ed0e914a4c6d7440b1d29</id>
<content type='text'>
The previous one did not clear the variable in one codepath,
but we should aim to be complete.

Signed-off-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
[jc: made a reroll into incremental, as the previous one already is
 in the next branch]
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<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>fetch-pack: clear alternate shallow when complete</title>
<updated>2019-02-04T21:33:32Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2019-02-04T00:06:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=23311f35424705f11acf80685bac1fe27e36192f'/>
<id>urn:sha1:23311f35424705f11acf80685bac1fe27e36192f</id>
<content type='text'>
When we write an alternate shallow file in update_shallow, we write it
into the lock file. The string stored in alternate_shallow_file is
copied from the lock file path, but it is freed the moment that the lock
file is closed, since we call strbuf_release to free that path.

This used to work, since we did not invoke git index-pack more than
once, but now that we do, we reuse the freed memory. Ensure we reset the
value to NULL to avoid using freed memory. git index-pack will read the
repository's shallow file, which will have been updated with the correct
information.

Signed-off-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</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>Merge branch 'ms/packet-err-check' into jt/fetch-v2-sideband</title>
<updated>2019-01-14T19:16:04Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-01-14T19:16:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=17069c7fae20f5e3082ee639066a37de5af6030e'/>
<id>urn:sha1:17069c7fae20f5e3082ee639066a37de5af6030e</id>
<content type='text'>
* ms/packet-err-check:
  pack-protocol.txt: accept error packets in any context
  Use packet_reader instead of packet_read_line
</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>
</feed>
