<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/cache-tree.h, branch v2.35.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.35.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.35.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2021-01-24T01:14:07Z</updated>
<entry>
<title>cache-tree: extract subtree_pos()</title>
<updated>2021-01-24T01:14:07Z</updated>
<author>
<name>Derrick Stolee</name>
<email>dstolee@microsoft.com</email>
</author>
<published>2021-01-23T19:58:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c80dd3967f28527dab49c8e9525524c7f33baa22'/>
<id>urn:sha1:c80dd3967f28527dab49c8e9525524c7f33baa22</id>
<content type='text'>
This method will be helpful to use outside of cache-tree.c in a later
feature. The implementation is subtle due to subtree_name_cmp() sorting
by length and then lexicographically.

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>cache-tree: share code between functions writing an index as a tree</title>
<updated>2019-08-19T17:08:03Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2019-08-17T18:41:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=724dd767b245db588840d7e9dbd46687ee84020b'/>
<id>urn:sha1:724dd767b245db588840d7e9dbd46687ee84020b</id>
<content type='text'>
write_tree_from_memory() appeared to be a merge-recursive special that
basically duplicated write_index_as_tree().  The two have a different
signature, but the bigger difference was just that write_index_as_tree()
would always unconditionally read the index off of disk instead of
working on the current in-memory index.  So:

  * split out common code into write_index_as_tree_internal()

  * rename write_tree_from_memory() to write_inmemory_index_as_tree(),
    make it call write_index_as_tree_internal(), and move it to
    cache-tree.c

Signed-off-by: Elijah Newren &lt;newren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>cache.h: flip NO_THE_INDEX_COMPATIBILITY_MACROS switch</title>
<updated>2019-01-24T19:55:06Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2019-01-24T08:29:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f8adbec9feaa7a1ab9814db1115826e87033712e'/>
<id>urn:sha1:f8adbec9feaa7a1ab9814db1115826e87033712e</id>
<content type='text'>
By default, index compat macros are off from now on, because they
could hide the_index dependency.

Only those in builtin can use it.

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>cache-tree.c: remove the_repository references</title>
<updated>2018-11-12T05:50:06Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2018-11-10T05:49:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c207e9e1f6dd1802f0deadae51af5615d855edc4'/>
<id>urn:sha1:c207e9e1f6dd1802f0deadae51af5615d855edc4</id>
<content type='text'>
This case is more interesting than other boring "remove the_repo"
commits because while we need access to the object database, we cannot
simply use r-&gt;index because unpack-trees.c can operate on a temporary
index, not $GIT_DIR/index. Ideally we should be able to pass an object
database to lookup_tree() but that ship has sailed.

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>Merge branch 'nd/unpack-trees-with-cache-tree'</title>
<updated>2018-09-17T20:53:53Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-09-17T20:53:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7e794d0a3f7ad4a37541539b823d5b9afdc10ce3'/>
<id>urn:sha1:7e794d0a3f7ad4a37541539b823d5b9afdc10ce3</id>
<content type='text'>
The unpack_trees() API used in checking out a branch and merging
walks one or more trees along with the index.  When the cache-tree
in the index tells us that we are walking a tree whose flattened
contents is known (i.e. matches a span in the index), as linearly
scanning a span in the index is much more efficient than having to
open tree objects recursively and listing their entries, the walk
can be optimized, which is done in this topic.

* nd/unpack-trees-with-cache-tree:
  Document update for nd/unpack-trees-with-cache-tree
  cache-tree: verify valid cache-tree in the test suite
  unpack-trees: add missing cache invalidation
  unpack-trees: reuse (still valid) cache-tree from src_index
  unpack-trees: reduce malloc in cache-tree walk
  unpack-trees: optimize walking same trees with cache-tree
  unpack-trees: add performance tracing
  trace.h: support nested performance tracing
</content>
</entry>
<entry>
<title>cache-tree: verify valid cache-tree in the test suite</title>
<updated>2018-08-18T16:47:46Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2018-08-18T14:41:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4592e6080ff0f9eb0218162be0e40b2d6abc979a'/>
<id>urn:sha1:4592e6080ff0f9eb0218162be0e40b2d6abc979a</id>
<content type='text'>
This makes sure that cache-tree is consistent with the index. The main
purpose is to catch potential problems by saving the index in
unpack_trees() but the line in write_index() would also help spot
missing invalidation in other code.

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>cache-tree: wrap the_index based wrappers with #ifdef</title>
<updated>2018-08-13T21:14:42Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2018-08-13T16:14:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=07096c969678a999c24816805d72bf7e0e840384'/>
<id>urn:sha1:07096c969678a999c24816805d72bf7e0e840384</id>
<content type='text'>
This puts update_main_cache_tree() and write_cache_as_tree() in the
same group of "index compat" functions that assume the_index
implicitly, which should only be used within builtin/ or t/helper.

sequencer.c is also updated to not use these functions. As of now, no
files outside builtin/ use these functions anymore.

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>cache-tree.h: drop extern from function declaration</title>
<updated>2018-08-03T17:42:54Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2018-06-30T09:20:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9ab34f9e0586d4f7b73270bdd50f9a0be64514c1'/>
<id>urn:sha1:9ab34f9e0586d4f7b73270bdd50f9a0be64514c1</id>
<content type='text'>
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>cache-tree: convert write_*_as_tree to object_id</title>
<updated>2018-03-14T16:23:47Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2018-03-12T02:27:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fc5cb99f675b2052f6d6bd3e2520379031b12267'/>
<id>urn:sha1:fc5cb99f675b2052f6d6bd3e2520379031b12267</id>
<content type='text'>
Convert write_index_as_tree and write_cache_as_tree to use struct
object_id.

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 struct cache_tree to use struct object_id</title>
<updated>2017-05-02T01:46:41Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2017-05-01T02:28:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e0a92804044a4025fc8abbfa1d92fd16f6f2e1f4'/>
<id>urn:sha1:e0a92804044a4025fc8abbfa1d92fd16f6f2e1f4</id>
<content type='text'>
Convert the sha1 member of struct cache_tree to struct object_id by
changing the definition and applying the following semantic patch, plus
the standard object_id transforms:

@@
struct cache_tree E1;
@@
- E1.sha1
+ E1.oid.hash

@@
struct cache_tree *E1;
@@
- E1-&gt;sha1
+ E1-&gt;oid.hash

Fix up one reference to active_cache_tree which was not automatically
caught by Coccinelle.  These changes are prerequisites for converting
parse_object.

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>
