<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/commit-graph.c, branch v2.22.1</title>
<subtitle>Fork of git SCM with my patches.</subtitle>
<id>http://git.kilabit.info/git/atom?h=v2.22.1</id>
<link rel='self' href='http://git.kilabit.info/git/atom?h=v2.22.1'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/'/>
<updated>2019-07-29T19:38:22Z</updated>
<entry>
<title>Merge branch 'ds/close-object-store' into maint</title>
<updated>2019-07-29T19:38:22Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-07-29T19:38:22Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=dea6737bb76ba231474668a804d3f7178b766c47'/>
<id>urn:sha1:dea6737bb76ba231474668a804d3f7178b766c47</id>
<content type='text'>
The commit-graph file is now part of the "files that the runtime
may keep open file descriptors on, all of which would need to be
closed when done with the object store", and the file descriptor to
an existing commit-graph file now is closed before "gc" finalizes a
new instance to replace it.

* ds/close-object-store:
  packfile: rename close_all_packs to close_object_store
  packfile: close commit-graph in close_all_packs
  commit-graph: use raw_object_store when closing
  commit-graph: extract write_commit_graph_file()
  commit-graph: extract copy_oids_to_commits()
  commit-graph: extract count_distinct_commits()
  commit-graph: extract fill_oids_from_all_packs()
  commit-graph: extract fill_oids_from_commit_hex()
  commit-graph: extract fill_oids_from_packs()
  commit-graph: create write_commit_graph_context
  commit-graph: remove Future Work section
  commit-graph: collapse parameters into flags
  commit-graph: return with errors during write
  commit-graph: fix the_repository reference
</content>
</entry>
<entry>
<title>commit-graph: use raw_object_store when closing</title>
<updated>2019-06-12T18:33:54Z</updated>
<author>
<name>Derrick Stolee</name>
<email>dstolee@microsoft.com</email>
</author>
<published>2019-05-17T18:41:47Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=c3a3a964b29221a9b5fa305a08037c90b9f74be0'/>
<id>urn:sha1:c3a3a964b29221a9b5fa305a08037c90b9f74be0</id>
<content type='text'>
The close_commit_graph() method took a repository struct, but then
only uses the raw_object_store within. Change the function prototype
to make the method more flexible.

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-graph: extract write_commit_graph_file()</title>
<updated>2019-06-12T18:20:54Z</updated>
<author>
<name>Derrick Stolee</name>
<email>dstolee@microsoft.com</email>
</author>
<published>2019-06-12T13:29:45Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=238def57fe7ba219c9e50094512fff1068ac5413'/>
<id>urn:sha1:238def57fe7ba219c9e50094512fff1068ac5413</id>
<content type='text'>
The write_commit_graph() method is too complex, so we are
extracting helper functions one by one.

Extract write_commit_graph_file() that takes all of the information
in the context struct and writes the data to a commit-graph file.

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-graph: extract copy_oids_to_commits()</title>
<updated>2019-06-12T18:20:54Z</updated>
<author>
<name>Derrick Stolee</name>
<email>dstolee@microsoft.com</email>
</author>
<published>2019-06-12T13:29:44Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=f998d542260ec643875e7f0fa860dbb43c2388ca'/>
<id>urn:sha1:f998d542260ec643875e7f0fa860dbb43c2388ca</id>
<content type='text'>
The write_commit_graph() method is too complex, so we are
extracting helper functions one by one.

Extract copy_oids_to_commits(), which fills the commits list
with the distinct commits from the oids list. During this loop,
it also counts the number of "extra" edges from octopus merges.

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-graph: extract count_distinct_commits()</title>
<updated>2019-06-12T18:20:54Z</updated>
<author>
<name>Derrick Stolee</name>
<email>dstolee@microsoft.com</email>
</author>
<published>2019-06-12T13:29:43Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=014e3440f524a620fd8aba92f1efeac737d9c23d'/>
<id>urn:sha1:014e3440f524a620fd8aba92f1efeac737d9c23d</id>
<content type='text'>
The write_commit_graph() method is too complex, so we are
extracting helper functions one by one.

Extract count_distinct_commits(), which sorts the oids list, then
iterates through to find duplicates.

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-graph: extract fill_oids_from_all_packs()</title>
<updated>2019-06-12T18:20:54Z</updated>
<author>
<name>Derrick Stolee</name>
<email>dstolee@microsoft.com</email>
</author>
<published>2019-06-12T13:29:42Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=b2c83060525e69f628fb32836e311978e3899e6e'/>
<id>urn:sha1:b2c83060525e69f628fb32836e311978e3899e6e</id>
<content type='text'>
The write_commit_graph() method is too complex, so we are
extracting helper functions one by one.

Extract fill_oids_from_all_packs() that reads all pack-files
for commits and fills the oid list in the context.

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-graph: extract fill_oids_from_commit_hex()</title>
<updated>2019-06-12T18:20:54Z</updated>
<author>
<name>Derrick Stolee</name>
<email>dstolee@microsoft.com</email>
</author>
<published>2019-06-12T13:29:42Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=4c9efe850d75115a6deedd57072f1d7383bc03da'/>
<id>urn:sha1:4c9efe850d75115a6deedd57072f1d7383bc03da</id>
<content type='text'>
The write_commit_graph() method is too complex, so we are
extracting helper functions one by one.

Extract fill_oids_from_commit_hex() that reads the given commit
id list and fille the oid list in the context.

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-graph: extract fill_oids_from_packs()</title>
<updated>2019-06-12T18:20:53Z</updated>
<author>
<name>Derrick Stolee</name>
<email>dstolee@microsoft.com</email>
</author>
<published>2019-06-12T13:29:41Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=ef5b83f2cfe11c2feb98b962881e9a8e6281e3ff'/>
<id>urn:sha1:ef5b83f2cfe11c2feb98b962881e9a8e6281e3ff</id>
<content type='text'>
The write_commit_graph() method is too complex, so we are
extracting helper functions one by one.

This extracts fill_oids_from_packs() that reads the given
pack-file list and fills the oid list in the context.

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-graph: create write_commit_graph_context</title>
<updated>2019-06-12T18:20:53Z</updated>
<author>
<name>Derrick Stolee</name>
<email>dstolee@microsoft.com</email>
</author>
<published>2019-06-12T13:29:40Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=c9905beade13efff6be9c15ebe03d07fe5278ccc'/>
<id>urn:sha1:c9905beade13efff6be9c15ebe03d07fe5278ccc</id>
<content type='text'>
The write_commit_graph() method is too large and complex. To simplify
it, we should extract several helper functions. However, we will risk
repeating a lot of declarations related to progress incidators and
object id or commit lists.

Create a new write_commit_graph_context struct that contains the
core data structures used in this process. Replace the other local
variables with the values inside the context object. Following this
change, we will start to lift code segments wholesale out of the
write_commit_graph() method and into helper functions.

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-graph: collapse parameters into flags</title>
<updated>2019-06-12T18:20:53Z</updated>
<author>
<name>Derrick Stolee</name>
<email>dstolee@microsoft.com</email>
</author>
<published>2019-06-12T13:29:38Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=5af803945212af875670582ff153ee05ec368b83'/>
<id>urn:sha1:5af803945212af875670582ff153ee05ec368b83</id>
<content type='text'>
The write_commit_graph() and write_commit_graph_reachable() methods
currently take two boolean parameters: 'append' and 'report_progress'.
As we update these methods, adding more parameters this way becomes
cluttered and hard to maintain.

Collapse these parameters into a 'flags' parameter, and adjust the
callers to provide flags as necessary.

Signed-off-by: Derrick Stolee &lt;dstolee@microsoft.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
