<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/fetch-pack.c, branch v2.5.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.5.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.5.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2015-07-01T21:02:33Z</updated>
<entry>
<title>Merge branch 'me/fetch-into-shallow-safety'</title>
<updated>2015-07-01T21:02:33Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-07-01T21:02:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=58eb0122f3f4799a1b7a3ce836e52dcb2dad45bd'/>
<id>urn:sha1:58eb0122f3f4799a1b7a3ce836e52dcb2dad45bd</id>
<content type='text'>
"git fetch --depth=&lt;depth&gt;" and "git clone --depth=&lt;depth&gt;" issued
a shallow transfer request even to an upload-pack that does not
support the capability.

* me/fetch-into-shallow-safety:
  fetch-pack: check for shallow if depth given
</content>
</entry>
<entry>
<title>fetch-pack: check for shallow if depth given</title>
<updated>2015-06-17T19:03:58Z</updated>
<author>
<name>Mike Edgar</name>
<email>adgar@google.com</email>
</author>
<published>2015-06-17T11:48:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=eb86a507a150b8fbb34fb4e59bf9edbefbbad778'/>
<id>urn:sha1:eb86a507a150b8fbb34fb4e59bf9edbefbbad778</id>
<content type='text'>
When a repository is first fetched as a shallow clone, either by
git-clone or by fetching into an empty repo, the server's capabilities
are not currently consulted. The client will send shallow requests even
if the server does not understand them, and the resulting error may be
unhelpful to the user. This change pre-emptively checks so we can exit
with a helpful error if necessary.

Signed-off-by: Mike Edgar &lt;adgar@google.com&gt;
Reviewed-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'bc/object-id'</title>
<updated>2015-06-05T19:17:37Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-06-05T19:17:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5455ee0573a22bb793a7083d593ae1ace909cd4c'/>
<id>urn:sha1:5455ee0573a22bb793a7083d593ae1ace909cd4c</id>
<content type='text'>
for_each_ref() callback functions were taught to name the objects
not with "unsigned char sha1[20]" but with "struct object_id".

* bc/object-id: (56 commits)
  struct ref_lock: convert old_sha1 member to object_id
  warn_if_dangling_symref(): convert local variable "junk" to object_id
  each_ref_fn_adapter(): remove adapter
  rev_list_insert_ref(): remove unneeded arguments
  rev_list_insert_ref_oid(): new function, taking an object_oid
  mark_complete(): remove unneeded arguments
  mark_complete_oid(): new function, taking an object_oid
  clear_marks(): rewrite to take an object_id argument
  mark_complete(): rewrite to take an object_id argument
  send_ref(): convert local variable "peeled" to object_id
  upload-pack: rewrite functions to take object_id arguments
  find_symref(): convert local variable "unused" to object_id
  find_symref(): rewrite to take an object_id argument
  write_one_ref(): rewrite to take an object_id argument
  write_refs_to_temp_dir(): convert local variable sha1 to object_id
  submodule: rewrite to take an object_id argument
  shallow: rewrite functions to take object_id arguments
  handle_one_ref(): rewrite to take an object_id argument
  add_info_ref(): rewrite to take an object_id argument
  handle_one_reflog(): rewrite to take an object_id argument
  ...
</content>
</entry>
<entry>
<title>rev_list_insert_ref(): remove unneeded arguments</title>
<updated>2015-05-25T19:19:39Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2015-05-25T18:39:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c38cd1c89d662dc0f4fd30f98cc8904c2143c7ab'/>
<id>urn:sha1:c38cd1c89d662dc0f4fd30f98cc8904c2143c7ab</id>
<content type='text'>
Now that the function is not being used as an each_ref_sha1_fn, we can
delete the unused arguments in its signature.

Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
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>rev_list_insert_ref_oid(): new function, taking an object_oid</title>
<updated>2015-05-25T19:19:39Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2015-05-25T18:39:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b1b49c6eb607b3f5697db7dae51e5152a3af3423'/>
<id>urn:sha1:b1b49c6eb607b3f5697db7dae51e5152a3af3423</id>
<content type='text'>
This function can be used with for_each_ref() without having to be
wrapped.

Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
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>mark_complete(): remove unneeded arguments</title>
<updated>2015-05-25T19:19:38Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2015-05-25T18:39:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6e20a51a8096059ecba6c7959d308c52f9fe8900'/>
<id>urn:sha1:6e20a51a8096059ecba6c7959d308c52f9fe8900</id>
<content type='text'>
Now that the function is not being used as an each_ref_sha1_fn, we can
delete the unused arguments in its signature.

Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
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>mark_complete_oid(): new function, taking an object_oid</title>
<updated>2015-05-25T19:19:38Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2015-05-25T18:39:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f8ee4d85229a26ec6d4ce403d953eea6b53c6396'/>
<id>urn:sha1:f8ee4d85229a26ec6d4ce403d953eea6b53c6396</id>
<content type='text'>
This function can be used with for_each_ref() without having to be
wrapped.

Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
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>clear_marks(): rewrite to take an object_id argument</title>
<updated>2015-05-25T19:19:38Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2015-05-25T18:39:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c50fb6cee6627ab9355e2d1e09fcab9dfe92cdb7'/>
<id>urn:sha1:c50fb6cee6627ab9355e2d1e09fcab9dfe92cdb7</id>
<content type='text'>
Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
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>each_ref_fn: change to take an object_id parameter</title>
<updated>2015-05-25T19:19:27Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2015-05-25T18:38:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2b2a5be394bc67bed86bc009195c664dca740bd6'/>
<id>urn:sha1:2b2a5be394bc67bed86bc009195c664dca740bd6</id>
<content type='text'>
Change typedef each_ref_fn to take a "const struct object_id *oid"
parameter instead of "const unsigned char *sha1".

To aid this transition, implement an adapter that can be used to wrap
old-style functions matching the old typedef, which is now called
"each_ref_sha1_fn"), and make such functions callable via the new
interface. This requires the old function and its cb_data to be
wrapped in a "struct each_ref_fn_sha1_adapter", and that object to be
used as the cb_data for an adapter function, each_ref_fn_adapter().

This is an enormous diff, but most of it consists of simple,
mechanical changes to the sites that call any of the "for_each_ref"
family of functions. Subsequent to this change, the call sites can be
rewritten one by one to use the new interface.

Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
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>upload-pack: optionally allow fetching reachable sha1</title>
<updated>2015-05-23T01:25:36Z</updated>
<author>
<name>Fredrik Medley</name>
<email>fredrik.medley@gmail.com</email>
</author>
<published>2015-05-21T20:23:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=68ee628932c2196742b77d2961c5e16360734a62'/>
<id>urn:sha1:68ee628932c2196742b77d2961c5e16360734a62</id>
<content type='text'>
With uploadpack.allowReachableSHA1InWant configuration option set on the
server side, "git fetch" can make a request with a "want" line that names
an object that has not been advertised (likely to have been obtained out
of band or from a submodule pointer). Only objects reachable from the
branch tips, i.e. the union of advertised branches and branches hidden by
transfer.hideRefs, will be processed. Note that there is an associated
cost of having to walk back the history to check the reachability.

This feature can be used when obtaining the content of a certain commit,
for which the sha1 is known, without the need of cloning the whole
repository, especially if a shallow fetch is used. Useful cases are e.g.
repositories containing large files in the history, fetching only the
needed data for a submodule checkout, when sharing a sha1 without telling
which exact branch it belongs to and in Gerrit, if you think in terms of
commits instead of change numbers. (The Gerrit case has already been
solved through allowTipSHA1InWant as every Gerrit change has a ref.)

Signed-off-by: Fredrik Medley &lt;fredrik.medley@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
