<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/http-push.c, branch v2.9.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.9.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.9.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2016-05-06T21:45:44Z</updated>
<entry>
<title>Merge branch 'bc/object-id'</title>
<updated>2016-05-06T21:45:44Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-05-06T21:45:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8429f2b42d04a0598079c847c39d45d777613939'/>
<id>urn:sha1:8429f2b42d04a0598079c847c39d45d777613939</id>
<content type='text'>
Move from unsigned char[20] to struct object_id continues.

* bc/object-id:
  match-trees: convert several leaf functions to use struct object_id
  tree-walk: convert tree_entry_extract() to use struct object_id
  struct name_entry: use struct object_id instead of unsigned char sha1[20]
  match-trees: convert shift_tree() and shift_tree_by() to use object_id
  test-match-trees: convert to use struct object_id
  sha1-name: introduce a get_oid() function
</content>
</entry>
<entry>
<title>http: support sending custom HTTP headers</title>
<updated>2016-04-27T21:02:33Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2016-04-27T12:20:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8cb01e2fd3a50b6d0893dfb066183f16a3c7a355'/>
<id>urn:sha1:8cb01e2fd3a50b6d0893dfb066183f16a3c7a355</id>
<content type='text'>
We introduce a way to send custom HTTP headers with all requests.

This allows us, for example, to send an extra token from build agents
for temporary access to private repositories. (This is the use case that
triggered this patch.)

This feature can be used like this:

	git -c http.extraheader='Secret: sssh!' fetch $URL $REF

Note that `curl_easy_setopt(..., CURLOPT_HTTPHEADER, ...)` takes only
a single list, overriding any previous call. This means we have to
collect _all_ of the headers we want to use into a single list, and
feed it to cURL in one shot. Since we already unconditionally set a
"pragma" header when initializing the curl handles, we can add our new
headers to that list.

For callers which override the default header list (like probe_rpc),
we provide `http_copy_default_headers()` so they can do the same
trick.

Big thanks to Jeff King and Junio Hamano for their outstanding help and
patient reviews.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&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>struct name_entry: use struct object_id instead of unsigned char sha1[20]</title>
<updated>2016-04-25T21:23:42Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2016-04-17T23:10:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7d924c9139e33e7599d7aed0446e634c427a5f15'/>
<id>urn:sha1:7d924c9139e33e7599d7aed0446e634c427a5f15</id>
<content type='text'>
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>http-push: stop using name_path</title>
<updated>2016-02-12T20:51:05Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2016-02-11T22:23:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=415959387e0642842be7aad05fa5d95ea4ed350f'/>
<id>urn:sha1:415959387e0642842be7aad05fa5d95ea4ed350f</id>
<content type='text'>
The graph traversal code here passes along a name_path to
build up the pathname at which we find each blob. But we
never actually do anything with the resulting names, making
it a waste of code and memory.

This usage came in aa1dbc9 (Update http-push functionality,
2006-03-07), and originally the result was passed to
"add_object" (which stored it, but didn't really use it,
either). But we stopped using that function in 1f1e895 (Add
"named object array" concept, 2006-06-19) in favor of
storing just the objects themselves.

Moreover, the generation of the name in process_tree() is
buggy. It sticks "name" onto the end of the name_path linked
list, and then passes it down again as it recurses (instead
of "entry.path"). So it's a good thing this was unused, as
the resulting path for "a/b/c/d" would end up as "a/a/a/a".

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Remove get_object_hash.</title>
<updated>2015-11-20T13:02:05Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2015-11-10T02:22:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ed1c9977cb1b63e4270ad8bdf967a2d02580aa08'/>
<id>urn:sha1:ed1c9977cb1b63e4270ad8bdf967a2d02580aa08</id>
<content type='text'>
Convert all instances of get_object_hash to use an appropriate reference
to the hash member of the oid member of struct object.  This provides no
functional change, as it is essentially a macro substitution.

Signed-off-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
Signed-off-by: Jeff King &lt;peff@peff.net&gt;
</content>
</entry>
<entry>
<title>Convert struct object to object_id</title>
<updated>2015-11-20T13:02:05Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2015-11-10T02:22:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f2fd0760f62e79609fef7bfd7ecebb002e8e4ced'/>
<id>urn:sha1:f2fd0760f62e79609fef7bfd7ecebb002e8e4ced</id>
<content type='text'>
struct object is one of the major data structures dealing with object
IDs.  Convert it to use struct object_id instead of an unsigned char
array.  Convert get_object_hash to refer to the new member as well.

Signed-off-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
Signed-off-by: Jeff King &lt;peff@peff.net&gt;
</content>
</entry>
<entry>
<title>Add several uses of get_object_hash.</title>
<updated>2015-11-20T13:02:05Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2015-11-10T02:22:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7999b2cf772956466baa8925491d6fb1b0963292'/>
<id>urn:sha1:7999b2cf772956466baa8925491d6fb1b0963292</id>
<content type='text'>
Convert most instances where the sha1 member of struct object is
dereferenced to use get_object_hash.  Most instances that are passed to
functions that have versions taking struct object_id, such as
get_sha1_hex/get_oid_hex, or instances that can be trivially converted
to use struct object_id instead, are not converted.

Signed-off-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
Signed-off-by: Jeff King &lt;peff@peff.net&gt;
</content>
</entry>
<entry>
<title>ref_newer: convert to use struct object_id</title>
<updated>2015-11-20T13:02:05Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2015-11-10T02:22:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6f3d57b6e43d6c6f13c94371f16b79fcdece25bc'/>
<id>urn:sha1:6f3d57b6e43d6c6f13c94371f16b79fcdece25bc</id>
<content type='text'>
Convert ref_newer and its caller to use struct object_id instead of
unsigned char *.

Signed-off-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
Signed-off-by: Jeff King &lt;peff@peff.net&gt;
</content>
</entry>
<entry>
<title>Convert struct ref to use object_id.</title>
<updated>2015-11-20T13:02:05Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2015-11-10T02:22:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f4e54d02b894064d370e461385b48701485672bd'/>
<id>urn:sha1:f4e54d02b894064d370e461385b48701485672bd</id>
<content type='text'>
Use struct object_id in three fields in struct ref and convert all the
necessary places that use it.

Signed-off-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
Signed-off-by: Jeff King &lt;peff@peff.net&gt;
</content>
</entry>
<entry>
<title>drop strcpy in favor of raw sha1_to_hex</title>
<updated>2015-10-05T18:08:05Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2015-09-24T21:08:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2b87d3a89633fb6078203a77d2610175f94cef95'/>
<id>urn:sha1:2b87d3a89633fb6078203a77d2610175f94cef95</id>
<content type='text'>
In some cases where we strcpy() the result of sha1_to_hex(),
there's no need; the result goes directly into a printf
statement, and we can simply pass the return value from
sha1_to_hex() directly.

When this code was originally written, sha1_to_hex used a
single buffer, and it was not safe to use it twice within a
single expression. That changed as of dcb3450 (sha1_to_hex()
usage cleanup, 2006-05-03), but this code was never updated.

History-dug-by: Eric Sunshine &lt;sunshine@sunshineco.com&gt;
Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
