<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/walker.c, branch v2.18.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.18.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.18.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2018-05-23T05:38:13Z</updated>
<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>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>
<entry>
<title>treewide: replace maybe_tree with accessor methods</title>
<updated>2018-04-11T01:47:16Z</updated>
<author>
<name>Derrick Stolee</name>
<email>dstolee@microsoft.com</email>
</author>
<published>2018-04-06T19:09:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2e27bd7731d47b374c1c14b53af07b3bfa39fcac'/>
<id>urn:sha1:2e27bd7731d47b374c1c14b53af07b3bfa39fcac</id>
<content type='text'>
In anticipation of making trees load lazily, create a Coccinelle
script (contrib/coccinelle/commit.cocci) to ensure that all
references to the 'maybe_tree' member of struct commit are either
mutations or accesses through get_commit_tree() or
get_commit_tree_oid().

Apply the Coccinelle script to create the rest of the patch.

Signed-off-by: Derrick Stolee &lt;dstolee@microsoft.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>treewide: rename tree to maybe_tree</title>
<updated>2018-04-11T01:47:16Z</updated>
<author>
<name>Derrick Stolee</name>
<email>dstolee@microsoft.com</email>
</author>
<published>2018-04-06T19:09:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=891435d55da80ca3654b19834481205be6bdfe33'/>
<id>urn:sha1:891435d55da80ca3654b19834481205be6bdfe33</id>
<content type='text'>
Using the commit-graph file to walk commit history removes the large
cost of parsing commits during the walk. This exposes a performance
issue: lookup_tree() takes a large portion of the computation time,
even when Git never uses those trees.

In anticipation of lazy-loading these trees, rename the 'tree' member
of struct commit to 'maybe_tree'. This serves two purposes: it hints
at the future role of possibly being NULL even if the commit has a
valid tree, and it allows for unambiguous transformation from simple
member access (i.e. commit-&gt;maybe_tree) to method access.

Signed-off-by: Derrick Stolee &lt;dstolee@microsoft.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>object: rename function 'typename' to 'type_name'</title>
<updated>2018-02-14T21:10:05Z</updated>
<author>
<name>Brandon Williams</name>
<email>bmwill@google.com</email>
</author>
<published>2018-02-14T18:59:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=debca9d2fe784193dc2d9f98b5edac605ddfefbb'/>
<id>urn:sha1:debca9d2fe784193dc2d9f98b5edac605ddfefbb</id>
<content type='text'>
Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams &lt;bmwill@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>refs: update ref transactions to use struct object_id</title>
<updated>2017-10-16T02:05:50Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2017-10-15T22:06:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=89f3bbdd3b1f46a5747aa5618b7742f7b3f2adef'/>
<id>urn:sha1:89f3bbdd3b1f46a5747aa5618b7742f7b3f2adef</id>
<content type='text'>
Update the ref transaction code to use struct object_id.  Remove one
NULL pointer check which was previously inserted around a dereference;
since we now pass a pointer to struct object_id directly through, the
code we're calling handles this for us.

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>walker: convert to struct object_id</title>
<updated>2017-10-16T02:05:50Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2017-10-15T22:06:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=94f5a121d4816969fc00a17411a30d15d80d21e9'/>
<id>urn:sha1:94f5a121d4816969fc00a17411a30d15d80d21e9</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>object: convert parse_object* to take struct object_id</title>
<updated>2017-05-08T06:12:58Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2017-05-06T22:10:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c251c83df276dc0bff4d008433268ad59b7a8df2'/>
<id>urn:sha1:c251c83df276dc0bff4d008433268ad59b7a8df2</id>
<content type='text'>
Make parse_object, parse_object_or_die, and parse_object_buffer take a
pointer to struct object_id.  Remove the temporary variables inserted
earlier, since they are no longer necessary.  Transform all of the
callers using the following semantic patch:

@@
expression E1;
@@
- parse_object(E1.hash)
+ parse_object(&amp;E1)

@@
expression E1;
@@
- parse_object(E1-&gt;hash)
+ parse_object(E1)

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

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

@@
expression E1, E2, E3, E4, E5;
@@
- parse_object_buffer(E1.hash, E2, E3, E4, E5)
+ parse_object_buffer(&amp;E1, E2, E3, E4, E5)

@@
expression E1, E2, E3, E4, E5;
@@
- parse_object_buffer(E1-&gt;hash, E2, E3, E4, E5)
+ parse_object_buffer(E1, E2, E3, E4, E5)

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>Convert lookup_tree to struct object_id</title>
<updated>2017-05-08T06:12:57Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2017-05-06T22:10:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=740ee055c6178fc2dd43c5ccfbd367c4c64d6e0d'/>
<id>urn:sha1:740ee055c6178fc2dd43c5ccfbd367c4c64d6e0d</id>
<content type='text'>
Convert the lookup_tree function to take a pointer to struct object_id.

The commit was created with manual changes to tree.c, tree.h, and
object.c, plus the following semantic patch:

@@
@@
- lookup_tree(EMPTY_TREE_SHA1_BIN)
+ lookup_tree(&amp;empty_tree_oid)

@@
expression E1;
@@
- lookup_tree(E1.hash)
+ lookup_tree(&amp;E1)

@@
expression E1;
@@
- lookup_tree(E1-&gt;hash)
+ lookup_tree(E1)

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>Convert lookup_blob to struct object_id</title>
<updated>2017-05-08T06:12:57Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2017-05-06T22:10:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3aca1fc6c9c69fbfce0e6312fc8e3087cb6334a4'/>
<id>urn:sha1:3aca1fc6c9c69fbfce0e6312fc8e3087cb6334a4</id>
<content type='text'>
Convert lookup_blob to take a pointer to struct object_id.

The commit was created with manual changes to blob.c and blob.h, plus
the following semantic patch:

@@
expression E1;
@@
- lookup_blob(E1.hash)
+ lookup_blob(&amp;E1)

@@
expression E1;
@@
- lookup_blob(E1-&gt;hash)
+ lookup_blob(E1)

Signed-off-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
