<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/commit.h, 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-30T05:04:08Z</updated>
<entry>
<title>Merge branch 'nd/pack-struct-commit'</title>
<updated>2018-05-30T05:04:08Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-05-30T05:04:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a4eae17c2c3f898d2838000c5f1b7c7d66c62316'/>
<id>urn:sha1:a4eae17c2c3f898d2838000c5f1b7c7d66c62316</id>
<content type='text'>
Memory optimization.

* nd/pack-struct-commit:
  commit.h: rearrange 'index' to shrink struct commit
</content>
</entry>
<entry>
<title>Merge branch 'js/deprecate-grafts'</title>
<updated>2018-05-23T05:38:17Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-05-23T05:38:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=352cf6cfe138b1dbcf9c105c91ca793b67511d7b'/>
<id>urn:sha1:352cf6cfe138b1dbcf9c105c91ca793b67511d7b</id>
<content type='text'>
The functionality of "$GIT_DIR/info/grafts" has been superseded by
the "refs/replace/" mechanism for some time now, but the internal
code had support for it in many places, which has been cleaned up
in order to drop support of the "grafts" mechanism.

* js/deprecate-grafts:
  Remove obsolete script to convert grafts to replace refs
  technical/shallow: describe why shallow cannot use replace refs
  technical/shallow: stop referring to grafts
  filter-branch: stop suggesting to use grafts
  Deprecate support for .git/info/grafts
  Add a test for `git replace --convert-graft-file`
  replace: introduce --convert-graft-file
  replace: prepare create_graft() for converting graft files wholesale
  replace: "libify" create_graft() and callees
  replace: avoid using die() to indicate a bug
  commit: Let the callback of for_each_mergetag return on error
  argv_array: offer to split a string by whitespace
</content>
</entry>
<entry>
<title>commit.h: rearrange 'index' to shrink struct commit</title>
<updated>2018-05-13T02:01:48Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2018-05-11T17:20:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=25f859fdf49c37780685d07ebda81b7716fb5879'/>
<id>urn:sha1:25f859fdf49c37780685d07ebda81b7716fb5879</id>
<content type='text'>
On linux 64-bit architecture, pahole finds that there's a 4 bytes
padding after 'index'. Moving it to the end reduces this struct's size
from 72 to 64 bytes (because of another 4 bytes padding after
graph_pos). On linux 32-bit, the struct size remains 52 bytes like
before.

Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>commit: Let the callback of for_each_mergetag return on error</title>
<updated>2018-04-26T03:52:57Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2018-04-25T09:54:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fef461ea5d53dd84c6d946f57a018ffc9f391a05'/>
<id>urn:sha1:fef461ea5d53dd84c6d946f57a018ffc9f391a05</id>
<content type='text'>
This is yet another patch to be filed under the keyword "libification".

There is one subtle change in behavior here, where a `git log` that has
been asked to show the mergetags would now stop reporting the mergetags
upon the first failure, whereas previously, it would have continued to the
next mergetag, if any.

In practice, that change should not matter, as it is 1) uncommon to
perform octopus merges using multiple tags as merge heads, and 2) when the
user asks to be shown those tags, they really should be there.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>commit-graph: lazy-load trees for commits</title>
<updated>2018-04-11T01:47:16Z</updated>
<author>
<name>Derrick Stolee</name>
<email>dstolee@microsoft.com</email>
</author>
<published>2018-04-06T19:09:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7b8a21dba1bce44d64bd86427d3d92437adc4707'/>
<id>urn:sha1:7b8a21dba1bce44d64bd86427d3d92437adc4707</id>
<content type='text'>
The commit-graph file provides quick access to commit data, including
the OID of the root tree for each commit in the graph. When performing
a deep commit-graph walk, we may not need to load most of the trees
for these commits.

Delay loading the tree object for a commit loaded from the graph
until requested via get_commit_tree(). Do not lazy-load trees for
commits not in the graph, since that requires duplicate parsing
and the relative peformance improvement when trees are not needed
is small.

On the Linux repository, performance tests were run for the following
command:

    git log --graph --oneline -1000

    Before: 0.92s
    After:  0.66s
    Rel %: -28.3%

Adding '-- kernel/' to the command requires loading the root tree
for every commit that is walked. There was no measureable performance
change as a result of this 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>commit: create get_commit_tree() method</title>
<updated>2018-04-11T01:47:16Z</updated>
<author>
<name>Derrick Stolee</name>
<email>dstolee@microsoft.com</email>
</author>
<published>2018-04-06T19:09:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5bb03de102b40d9e564be3a3a39084a550db79cb'/>
<id>urn:sha1:5bb03de102b40d9e564be3a3a39084a550db79cb</id>
<content type='text'>
While walking the commit graph, we load struct commit objects into
the object cache. During this process, we also load struct tree
objects for the root tree of each of these commits. We load these
objects even if we are only computing commit reachability information,
such as a merge base or ahead/behind information.

Create get_commit_tree() as a first step to removing direct
references to the 'maybe_tree' member of struct commit.

Create get_commit_tree_oid() as a shortcut for several references
to "&amp;commit-&gt;maybe_tree-&gt;object.oid" in the codebase.

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>commit: integrate commit graph with commit parsing</title>
<updated>2018-04-11T01:43:02Z</updated>
<author>
<name>Derrick Stolee</name>
<email>dstolee@microsoft.com</email>
</author>
<published>2018-04-10T12:56:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=177722b344256b84f1c97b7363d3f19c04928039'/>
<id>urn:sha1:177722b344256b84f1c97b7363d3f19c04928039</id>
<content type='text'>
Teach Git to inspect a commit graph file to supply the contents of a
struct commit when calling parse_commit_gently(). This implementation
satisfies all post-conditions on the struct commit, including loading
parents, the root tree, and the commit date.

If core.commitGraph is false, then do not check graph files.

In test script t5318-commit-graph.sh, add output-matching conditions on
read-only graph operations.

By loading commits from the graph instead of parsing commit buffers, we
save a lot of time on long commit walks. Here are some performance
results for a copy of the Linux repository where 'master' has 678,653
reachable commits and is behind 'origin/master' by 59,929 commits.

| Command                          | Before | After  | Rel % |
|----------------------------------|--------|--------|-------|
| log --oneline --topo-order -1000 |  8.31s |  0.94s | -88%  |
| branch -vv                       |  1.02s |  0.14s | -86%  |
| rev-list --all                   |  5.89s |  1.07s | -81%  |
| rev-list --all --objects         | 66.15s | 58.45s | -11%  |

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>commit: convert commit_tree* to object_id</title>
<updated>2018-01-30T18:42:36Z</updated>
<author>
<name>Patryk Obara</name>
<email>patryk.obara@gmail.com</email>
</author>
<published>2018-01-28T00:13:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5078f344591ee3c454e64ff73e6563f0a3f14950'/>
<id>urn:sha1:5078f344591ee3c454e64ff73e6563f0a3f14950</id>
<content type='text'>
Convert the definitions and declarations of commit_tree and
commit_tree_extended to use struct object_id and adjust all usages of
these functions.

Signed-off-by: Patryk Obara &lt;patryk.obara@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'rs/lose-leak-pending'</title>
<updated>2018-01-23T21:16:36Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-01-23T21:16:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0bbab7d2ab61b6aad217706e0879db561e1bdfae'/>
<id>urn:sha1:0bbab7d2ab61b6aad217706e0879db561e1bdfae</id>
<content type='text'>
API clean-up around revision traversal.

* rs/lose-leak-pending:
  commit: remove unused function clear_commit_marks_for_object_array()
  revision: remove the unused flag leak_pending
  checkout: avoid using the rev_info flag leak_pending
  bundle: avoid using the rev_info flag leak_pending
  bisect: avoid using the rev_info flag leak_pending
  object: add clear_commit_marks_all()
  ref-filter: use clear_commit_marks_many() in do_merge_filter()
  commit: use clear_commit_marks_many() in remove_redundant()
  commit: avoid allocation in clear_commit_marks_many()
</content>
</entry>
</feed>
