<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/walker.c, branch v2.23.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.23.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.23.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2019-06-20T17:06:19Z</updated>
<entry>
<title>object: convert lookup_unknown_object() to use object_id</title>
<updated>2019-06-20T17:06:19Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2019-06-20T07:41:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0ebbcf70e672ef9ad46eb4975a34d3639190aeb2'/>
<id>urn:sha1:0ebbcf70e672ef9ad46eb4975a34d3639190aeb2</id>
<content type='text'>
There are no callers left of lookup_unknown_object() that aren't just
passing us the "hash" member of a "struct object_id". Let's take the
whole struct, which gets us closer to removing all raw sha1 variables.
It also matches the existing conversions of lookup_blob(), etc.

The conversions of callers were done by hand, but they're all mechanical
one-liners.

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>tree-walk: store object_id in a separate member</title>
<updated>2019-01-15T17:57:41Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2019-01-15T00:39:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ea82b2a0857e3e0449bdce4e3987dee6adbc51ae'/>
<id>urn:sha1:ea82b2a0857e3e0449bdce4e3987dee6adbc51ae</id>
<content type='text'>
When parsing a tree, we read the object ID directly out of the tree
buffer. This is normally fine, but such an object ID cannot be used with
oidcpy, which copies GIT_MAX_RAWSZ bytes, because if we are using SHA-1,
there may not be that many bytes to copy.

Instead, store the object ID in a separate struct member. Since we can
no longer efficiently compute the path length, store that information as
well in struct name_entry. Ensure we only copy the object ID into the
new buffer if the path length is nonzero, as some callers will pass us
an empty path with no object ID following it, and we will not want to
read past the end of the buffer.

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>commit: add repository argument to lookup_commit_reference_gently</title>
<updated>2018-06-29T17:43:39Z</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2018-06-29T01:21:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=21e1ee8f4f4b7767d506b02504e97f6bcaef13a0'/>
<id>urn:sha1:21e1ee8f4f4b7767d506b02504e97f6bcaef13a0</id>
<content type='text'>
Add a repository argument to allow callers of
lookup_commit_reference_gently to be more specific about which
repository to handle. This is a small mechanical change; it doesn't
change the implementation to handle repositories other than
the_repository yet.

As with the previous commits, use a macro to catch callers passing a
repository other than the_repository at compile time.

Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>tree: add repository argument to lookup_tree</title>
<updated>2018-06-29T17:43:38Z</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2018-06-29T01:21:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f86bcc7b2ce6cad68ba1a48a528e380c6126705e'/>
<id>urn:sha1:f86bcc7b2ce6cad68ba1a48a528e380c6126705e</id>
<content type='text'>
Add a repository argument to allow the callers of lookup_tree
to be more specific about which repository to act on. This is a small
mechanical change; it doesn't change the implementation to handle
repositories other than the_repository yet.

As with the previous commits, use a macro to catch callers passing a
repository other than the_repository at compile time.

Signed-off-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>blob: add repository argument to lookup_blob</title>
<updated>2018-06-29T17:43:38Z</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2018-06-29T01:21:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=da14a7ff99e1d011192a1fe330dd3fddf8977dc3'/>
<id>urn:sha1:da14a7ff99e1d011192a1fe330dd3fddf8977dc3</id>
<content type='text'>
Add a repository argument to allow the callers of lookup_blob
to be more specific about which repository to act on. This is a small
mechanical change; it doesn't change the implementation to handle
repositories other than the_repository yet.

As with the previous commits, use a macro to catch callers passing a
repository other than the_repository at compile time.

Signed-off-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>object: add repository argument to parse_object</title>
<updated>2018-06-29T17:43:38Z</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2018-06-29T01:21:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=109cd76dd3467bd05f8d2145b857006649741d5c'/>
<id>urn:sha1:109cd76dd3467bd05f8d2145b857006649741d5c</id>
<content type='text'>
Add a repository argument to allow the callers of parse_object
to be more specific about which repository to act on. This is a small
mechanical change; it doesn't change the implementation to handle
repositories other than the_repository yet.

As with the previous commits, use a macro to catch callers passing a
repository other than the_repository at compile time.

Signed-off-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'sb/object-store-grafts' into sb/object-store-lookup</title>
<updated>2018-06-29T17:43:28Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-06-29T17:24:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b16b60f71b2354cbad5f2dc16bd5f6cf7d617579'/>
<id>urn:sha1:b16b60f71b2354cbad5f2dc16bd5f6cf7d617579</id>
<content type='text'>
* sb/object-store-grafts:
  commit: allow lookup_commit_graft to handle arbitrary repositories
  commit: allow prepare_commit_graft to handle arbitrary repositories
  shallow: migrate shallow information into the object parser
  path.c: migrate global git_path_* to take a repository argument
  cache: convert get_graft_file to handle arbitrary repositories
  commit: convert read_graft_file to handle arbitrary repositories
  commit: convert register_commit_graft to handle arbitrary repositories
  commit: convert commit_graft_pos() to handle arbitrary repositories
  shallow: add repository argument to is_repository_shallow
  shallow: add repository argument to check_shallow_file_for_update
  shallow: add repository argument to register_shallow
  shallow: add repository argument to set_alternate_shallow_file
  commit: add repository argument to lookup_commit_graft
  commit: add repository argument to prepare_commit_graft
  commit: add repository argument to read_graft_file
  commit: add repository argument to register_commit_graft
  commit: add repository argument to commit_graft_pos
  object: move grafts to object parser
  object-store: move object access functions to object-store.h
</content>
</entry>
<entry>
<title>Merge branch 'ds/lazy-load-trees'</title>
<updated>2018-05-23T05:38:13Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-05-23T05:38:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c89b6e136e421f1e9108b3c5bc050b19b0243844'/>
<id>urn:sha1:c89b6e136e421f1e9108b3c5bc050b19b0243844</id>
<content type='text'>
The code has been taught to use the duplicated information stored
in the commit-graph file to learn the tree object name for a commit
to avoid opening and parsing the commit object when it makes sense
to do so.

* ds/lazy-load-trees:
  coccinelle: avoid wrong transformation suggestions from commit.cocci
  commit-graph: lazy-load trees for commits
  treewide: replace maybe_tree with accessor methods
  commit: create get_commit_tree() method
  treewide: rename tree to maybe_tree
</content>
</entry>
<entry>
<title>object-store: move object access functions to object-store.h</title>
<updated>2018-05-16T02:42:03Z</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2018-05-15T23:42:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=cbd53a2193d11e83b5bad2c3514bd1603074bc36'/>
<id>urn:sha1:cbd53a2193d11e83b5bad2c3514bd1603074bc36</id>
<content type='text'>
This should make these functions easier to find and cache.h less
overwhelming to read.

In particular, this moves:
- read_object_file
- oid_object_info
- write_object_file

As a result, most of the codebase needs to #include object-store.h.
In this patch the #include is only added to files that would fail to
compile otherwise.  It would be better to #include wherever
identifiers from the header are used.  That can happen later
when we have better tooling for it.

Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>walker: drop fields of `struct walker` which are always 1</title>
<updated>2018-04-24T01:55:04Z</updated>
<author>
<name>Martin Ågren</name>
<email>martin.agren@gmail.com</email>
</author>
<published>2018-04-22T18:12:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0b6b34295413410e4ca52df4671d2a217e56a57b'/>
<id>urn:sha1:0b6b34295413410e4ca52df4671d2a217e56a57b</id>
<content type='text'>
After the previous commit, both users of `struct walker` set `get_tree`,
`get_history` and `get_all` to 1. Drop those fields and simplify the
walker implementation accordingly.

Let's hope that any out-of-tree users will not mind this change. They
should notice that the compilation fails as they try to set these
fields. (If they do not set them, note that `get_http_walker()` leaves
them undefined, so the behavior will have been undefined all the time.)

Signed-off-by: Martin Ågren &lt;martin.agren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
