<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/fetch-pack.c, branch v2.13.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.13.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.13.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2017-04-24T05:07:57Z</updated>
<entry>
<title>Merge branch 'dt/xgethostname-nul-termination'</title>
<updated>2017-04-24T05:07:57Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-04-24T05:07:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5938454cbc585e0f4bdd9f1cc87c6886a3c1bff3'/>
<id>urn:sha1:5938454cbc585e0f4bdd9f1cc87c6886a3c1bff3</id>
<content type='text'>
gethostname(2) may not NUL terminate the buffer if hostname does
not fit; unfortunately there is no easy way to see if our buffer
was too small, but at least this will make sure we will not end up
using garbage past the end of the buffer.

* dt/xgethostname-nul-termination:
  xgethostname: handle long hostnames
  use HOST_NAME_MAX to size buffers for gethostname(2)
</content>
</entry>
<entry>
<title>Merge branch 'jt/fetch-pack-error-reporting'</title>
<updated>2017-04-24T05:07:53Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-04-24T05:07:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d2617eb98440a43072c49e416e0986ef3231faa4'/>
<id>urn:sha1:d2617eb98440a43072c49e416e0986ef3231faa4</id>
<content type='text'>
"git fetch-pack" was not prepared to accept ERR packet that the
upload-pack can send with a human-readable error message.  It
showed the packet contents with ERR prefix, so there was no data
loss, but it was redundant to say "ERR" in an error message.

* jt/fetch-pack-error-reporting:
  fetch-pack: show clearer error message upon ERR
</content>
</entry>
<entry>
<title>xgethostname: handle long hostnames</title>
<updated>2017-04-19T02:58:04Z</updated>
<author>
<name>David Turner</name>
<email>dturner@twosigma.com</email>
</author>
<published>2017-04-18T21:57:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5781a9a2703e96b01587bb95ceebcc53f2cee91c'/>
<id>urn:sha1:5781a9a2703e96b01587bb95ceebcc53f2cee91c</id>
<content type='text'>
If the full hostname doesn't fit in the buffer supplied to
gethostname, POSIX does not specify whether the buffer will be
null-terminated, so to be safe, we should do it ourselves.  Introduce
new function, xgethostname, which ensures that there is always a \0
at the end of the buffer.

Signed-off-by: David Turner &lt;dturner@twosigma.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>use HOST_NAME_MAX to size buffers for gethostname(2)</title>
<updated>2017-04-19T02:57:41Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2017-04-18T21:57:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=da25bdb7766c01665500cf7c7b75e76ea1f28b49'/>
<id>urn:sha1:da25bdb7766c01665500cf7c7b75e76ea1f28b49</id>
<content type='text'>
POSIX limits the length of host names to HOST_NAME_MAX.  Export the
fallback definition from daemon.c and use this constant to make all
buffers used with gethostname(2) big enough for any possible result
and a terminating NUL.

Inspired-by: David Turner &lt;dturner@twosigma.com&gt;
Signed-off-by: Rene Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: David Turner &lt;dturner@twosigma.com&gt;
Reviewed-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>fetch-pack: show clearer error message upon ERR</title>
<updated>2017-04-18T01:51:28Z</updated>
<author>
<name>Jonathan Tan</name>
<email>jonathantanmy@google.com</email>
</author>
<published>2017-04-12T18:06:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8e2c7bef034f0712c6db776974ee4b40f1150a56'/>
<id>urn:sha1:8e2c7bef034f0712c6db776974ee4b40f1150a56</id>
<content type='text'>
Currently, fetch-pack prints a confusing error message ("expected
ACK/NAK") when the server it's communicating with sends a pkt-line
starting with "ERR".  Replace it with a less confusing error message.

Also update the documentation describing the fetch-pack/upload-pack
protocol (pack-protocol.txt) to indicate that "ERR" can be sent in the
place of "ACK" or "NAK". In practice, this has been done for quite some
time by other Git implementations (e.g. JGit sends "want $id not valid")
and by Git itself (since commit bdb31ea: "upload-pack: report "not our
ref" to client", 2017-02-23) whenever a "want" line references an object
that it does not have. (This is uncommon, but can happen if a repository
is garbage-collected during a negotiation.)

Signed-off-by: Jonathan Tan &lt;jonathantanmy@google.com&gt;
Reviewed-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Rename sha1_array to oid_array</title>
<updated>2017-03-31T15:33:56Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2017-03-31T01:40:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=910650d2f8755359ab7b1f0e2a2d576c06a68091'/>
<id>urn:sha1:910650d2f8755359ab7b1f0e2a2d576c06a68091</id>
<content type='text'>
Since this structure handles an array of object IDs, rename it to struct
oid_array.  Also rename the accessor functions and the initialization
constant.

This commit was produced mechanically by providing non-Documentation
files to the following Perl one-liners:

    perl -pi -E 's/struct sha1_array/struct oid_array/g'
    perl -pi -E 's/\bsha1_array_/oid_array_/g'
    perl -pi -E 's/SHA1_ARRAY_INIT/OID_ARRAY_INIT/g'

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>Make sha1_array_append take a struct object_id *</title>
<updated>2017-03-31T15:33:55Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2017-03-31T01:39:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=98a72ddc12e13231537150607f4a6a8ff8b43854'/>
<id>urn:sha1:98a72ddc12e13231537150607f4a6a8ff8b43854</id>
<content type='text'>
Convert the callers to pass struct object_id by changing the function
declaration and definition and applying the following semantic patch:

@@
expression E1, E2;
@@
- sha1_array_append(E1, E2.hash)
+ sha1_array_append(E1, &amp;E2)

@@
expression E1, E2;
@@
- sha1_array_append(E1, E2-&gt;hash)
+ sha1_array_append(E1, E2)

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>sha1-array: convert internal storage for struct sha1_array to object_id</title>
<updated>2017-03-28T16:59:34Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2017-03-26T16:01:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ee3051bd2307cdc0145aa9ed9dcacb8acfc08c40'/>
<id>urn:sha1:ee3051bd2307cdc0145aa9ed9dcacb8acfc08c40</id>
<content type='text'>
Make the internal storage for struct sha1_array use an array of struct
object_id internally.  Update the users of this struct which inspect its
internals.

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>Merge branch 'mm/fetch-show-error-message-on-unadvertised-object'</title>
<updated>2017-03-14T22:23:18Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-03-14T22:23:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=07198afbd19f5ba4f991d9b554bc320690de19dc'/>
<id>urn:sha1:07198afbd19f5ba4f991d9b554bc320690de19dc</id>
<content type='text'>
"git fetch" that requests a commit by object name, when the other
side does not allow such an request, failed without much
explanation.

* mm/fetch-show-error-message-on-unadvertised-object:
  fetch-pack: add specific error for fetching an unadvertised object
  fetch_refs_via_pack: call report_unmatched_refs
  fetch-pack: move code to report unmatched refs to a function
</content>
</entry>
<entry>
<title>fetch-pack: add specific error for fetching an unadvertised object</title>
<updated>2017-03-02T19:12:53Z</updated>
<author>
<name>Matt McCutchen</name>
<email>matt@mattmccutchen.net</email>
</author>
<published>2017-02-22T16:05:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d56583ded679f2eade3994d855c8d605e2964710'/>
<id>urn:sha1:d56583ded679f2eade3994d855c8d605e2964710</id>
<content type='text'>
Enhance filter_refs (which decides whether a request for an unadvertised
object should be sent to the server) to record a new match status on the
"struct ref" when a request is not allowed, and have
report_unmatched_refs check for this status and print a special error
message, "Server does not allow request for unadvertised object".

Signed-off-by: Matt McCutchen &lt;matt@mattmccutchen.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
