<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/resolve-undo.c, branch v2.36.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.36.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.36.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2021-04-30T04:50:26Z</updated>
<entry>
<title>Merge branch 'ds/sparse-index-protections'</title>
<updated>2021-04-30T04:50:26Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-04-30T04:50:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8e97852919fa422bc5fe57bc7e71826cf2b5224d'/>
<id>urn:sha1:8e97852919fa422bc5fe57bc7e71826cf2b5224d</id>
<content type='text'>
Builds on top of the sparse-index infrastructure to mark operations
that are not ready to mark with the sparse index, causing them to
fall back on fully-populated index that they always have worked with.

* ds/sparse-index-protections: (47 commits)
  name-hash: use expand_to_path()
  sparse-index: expand_to_path()
  name-hash: don't add directories to name_hash
  revision: ensure full index
  resolve-undo: ensure full index
  read-cache: ensure full index
  pathspec: ensure full index
  merge-recursive: ensure full index
  entry: ensure full index
  dir: ensure full index
  update-index: ensure full index
  stash: ensure full index
  rm: ensure full index
  merge-index: ensure full index
  ls-files: ensure full index
  grep: ensure full index
  fsck: ensure full index
  difftool: ensure full index
  commit: ensure full index
  checkout: ensure full index
  ...
</content>
</entry>
<entry>
<title>resolve-undo: ensure full index</title>
<updated>2021-04-14T20:47:45Z</updated>
<author>
<name>Derrick Stolee</name>
<email>dstolee@microsoft.com</email>
</author>
<published>2021-04-01T01:49:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=dc26b23ebc30adcb4aa54a5eccf2e47793984fa2'/>
<id>urn:sha1:dc26b23ebc30adcb4aa54a5eccf2e47793984fa2</id>
<content type='text'>
Before iterating over all cache entries, ensure that a sparse index is
expanded to a full index to avoid unexpected behavior.

Signed-off-by: Derrick Stolee &lt;dstolee@microsoft.com&gt;
Reviewed-by: Elijah Newren &lt;newren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>use CALLOC_ARRAY</title>
<updated>2021-03-14T00:00:09Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2021-03-13T16:17:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ca56dadb4b65ccaeab809d80db80a312dc00941a'/>
<id>urn:sha1:ca56dadb4b65ccaeab809d80db80a312dc00941a</id>
<content type='text'>
Add and apply a semantic patch for converting code that open-codes
CALLOC_ARRAY to use it instead.  It shortens the code and infers the
element size automatically.

Signed-off-by: René Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>resolve-undo.c: use the right index instead of the_index</title>
<updated>2018-08-13T21:14:44Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2018-08-13T16:14:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ff82d1260f55836e18625fbae1697dbbe3090531'/>
<id>urn:sha1:ff82d1260f55836e18625fbae1697dbbe3090531</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>dir.c: remove an implicit dependency on the_index in pathspec code</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:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6d2df284e7f4d7cd9f46992282ef59a72a9db527'/>
<id>urn:sha1:6d2df284e7f4d7cd9f46992282ef59a72a9db527</id>
<content type='text'>
Make the match_patchspec API and friends take an index_state instead
of assuming the_index in dir.c. All external call sites are converted
blindly to keep the patch simple and retain current behavior.
Individual call sites may receive further updates to use the right
index instead of the_index.

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>block alloc: add lifecycle APIs for cache_entry structs</title>
<updated>2018-07-03T17:58:27Z</updated>
<author>
<name>Jameson Miller</name>
<email>jamill@microsoft.com</email>
</author>
<published>2018-07-02T19:49:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a849735bfbf159b98ead9ef4c843dc8acfd372f0'/>
<id>urn:sha1:a849735bfbf159b98ead9ef4c843dc8acfd372f0</id>
<content type='text'>
It has been observed that the time spent loading an index with a large
number of entries is partly dominated by malloc() calls. This change
is in preparation for using memory pools to reduce the number of
malloc() calls made to allocate cahce entries when loading an index.

Add an API to allocate and discard cache entries, abstracting the
details of managing the memory backing the cache entries. This commit
does actually change how memory is managed - this will be done in a
later commit in the series.

This change makes the distinction between cache entries that are
associated with an index and cache entries that are not associated with
an index. A main use of cache entries is with an index, and we can
optimize the memory management around this. We still have other cases
where a cache entry is not persisted with an index, and so we need to
handle the "transient" use case as well.

To keep the congnitive overhead of managing the cache entries, there
will only be a single discard function. This means there must be enough
information kept with the cache entry so that we know how to discard
them.

A summary of the main functions in the API is:

make_cache_entry: create cache entry for use in an index. Uses specified
                  parameters to populate cache_entry fields.

make_empty_cache_entry: Create an empty cache entry for use in an index.
                        Returns cache entry with empty fields.

make_transient_cache_entry: create cache entry that is not used in an
                            index. Uses specified parameters to populate
                            cache_entry fields.

make_empty_transient_cache_entry: create cache entry that is not used in
                                  an index. Returns cache entry with
                                  empty fields.

discard_cache_entry: A single function that knows how to discard a cache
                     entry regardless of how it was allocated.

Signed-off-by: Jameson Miller &lt;jamill@microsoft.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>read-cache: teach make_cache_entry to take object_id</title>
<updated>2018-07-03T17:58:15Z</updated>
<author>
<name>Jameson Miller</name>
<email>jamill@microsoft.com</email>
</author>
<published>2018-07-02T19:49:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=825ed4d9a044380ac093563e6bd74311ea4488ef'/>
<id>urn:sha1:825ed4d9a044380ac093563e6bd74311ea4488ef</id>
<content type='text'>
Teach make_cache_entry function to take object_id instead of a SHA-1.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>cache: add a function to read an object ID from a buffer</title>
<updated>2018-05-02T04:59:48Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2018-05-02T00:25:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=69d124255ede771ff8162652762406c55ba491c0'/>
<id>urn:sha1:69d124255ede771ff8162652762406c55ba491c0</id>
<content type='text'>
In various places throughout the codebase, we need to read data into a
struct object_id from a pack or other unsigned char buffer.  Add an
inline function that does this based on the current hash algorithm in
use, and use it in several places.

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>resolve-undo: convert struct resolve_undo_info 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:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5ac913c6eb266e836f91c39c3b03bcbdc06475c6'/>
<id>urn:sha1:5ac913c6eb266e836f91c39c3b03bcbdc06475c6</id>
<content type='text'>
Convert the sha1 member of this struct to be an array of struct
object_id instead.  This change is needed to convert find_unique_abbrev.

Convert some instances of hard-coded constants to use the_hash_algo as
well.

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>cache: convert struct cache_entry to use struct object_id</title>
<updated>2016-09-07T19:59:42Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2016-09-05T20:07:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=99d1a9861ae88595e7386c453b6b38573a8a570c'/>
<id>urn:sha1:99d1a9861ae88595e7386c453b6b38573a8a570c</id>
<content type='text'>
Convert struct cache_entry to use struct object_id by applying the
following semantic patch and the object_id transforms from contrib, plus
the actual change to the struct:

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

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

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>
