<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/commit-graph.h, branch v2.19.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.19.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.19.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2018-11-21T13:57:47Z</updated>
<entry>
<title>Merge branch 'ds/commit-graph-with-grafts' into maint</title>
<updated>2018-11-21T13:57:47Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-11-21T13:57:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e60e38a15da202737790e2b2a9e613a9cf6ec092'/>
<id>urn:sha1:e60e38a15da202737790e2b2a9e613a9cf6ec092</id>
<content type='text'>
The recently introduced commit-graph auxiliary data is incompatible
with mechanisms such as replace &amp; grafts that "breaks" immutable
nature of the object reference relationship.  Disable optimizations
based on its use (and updating existing commit-graph) when these
incompatible features are in use in the repository.

* ds/commit-graph-with-grafts:
  commit-graph: close_commit_graph before shallow walk
  commit-graph: not compatible with uninitialized repo
  commit-graph: not compatible with grafts
  commit-graph: not compatible with replace objects
  test-repository: properly init repo
  commit-graph: update design document
  refs.c: upgrade for_each_replace_ref to be a each_repo_ref_fn callback
  refs.c: migrate internal ref iteration to pass thru repository argument
</content>
</entry>
<entry>
<title>commit-graph: close_commit_graph before shallow walk</title>
<updated>2018-08-21T17:22:51Z</updated>
<author>
<name>Derrick Stolee</name>
<email>dstolee@microsoft.com</email>
</author>
<published>2018-08-20T18:24:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=829a321569d8e8f2c582aef9f0c990df976ab842'/>
<id>urn:sha1:829a321569d8e8f2c582aef9f0c990df976ab842</id>
<content type='text'>
Call close_commit_graph() when about to start a rev-list walk that
includes shallow commits. This is necessary in code paths that "fake"
shallow commits for the sake of fetch. Specifically, test 351 in
t5500-fetch-pack.sh runs

	git fetch --shallow-exclude one origin

with a file-based transfer. When the "remote" has a commit-graph, we do
not prevent the commit-graph from being loaded, but then the commits are
intended to be dynamically transferred into shallow commits during
get_shallow_commits_by_rev_list(). By closing the commit-graph before
this call, we prevent this interaction.

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>Add missing includes and forward declarations</title>
<updated>2018-08-15T18:52:09Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2018-08-15T17:54:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ef3ca95475ce467ae883cc8175ed40e6f7d27800'/>
<id>urn:sha1:ef3ca95475ce467ae883cc8175ed40e6f7d27800</id>
<content type='text'>
I looped over the toplevel header files, creating a temporary two-line C
program for each consisting of
  #include "git-compat-util.h"
  #include $HEADER
This patch is the result of manually fixing errors in compiling those
tiny programs.

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>commit-graph: add repo arg to graph readers</title>
<updated>2018-07-17T22:47:48Z</updated>
<author>
<name>Jonathan Tan</name>
<email>jonathantanmy@google.com</email>
</author>
<published>2018-07-11T22:42:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=dade47c06cf849b0ca180a8e6383b55ea6f75812'/>
<id>urn:sha1:dade47c06cf849b0ca180a8e6383b55ea6f75812</id>
<content type='text'>
Add a struct repository argument to the functions in commit-graph.h that
read the commit graph. (This commit does not affect functions that write
commit graphs.)

Because the commit graph functions can now read the commit graph of any
repository, the global variable core_commit_graph has been removed.
Instead, the config option core.commitGraph is now read on the first
time in a repository that a commit is attempted to be parsed using its
commit graph.

This commit includes a test that exercises the functionality on an
arbitrary repository that is not the_repository.

Signed-off-by: Jonathan Tan &lt;jonathantanmy@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>commit-graph: add free_commit_graph</title>
<updated>2018-07-17T22:47:48Z</updated>
<author>
<name>Jonathan Tan</name>
<email>jonathantanmy@google.com</email>
</author>
<published>2018-07-11T22:42:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c3756d5b7fc6e163032296aa6c10fad2589273dc'/>
<id>urn:sha1:c3756d5b7fc6e163032296aa6c10fad2589273dc</id>
<content type='text'>
Signed-off-by: Jonathan Tan &lt;jonathantanmy@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>commit-graph: add missing forward declaration</title>
<updated>2018-07-17T22:47:48Z</updated>
<author>
<name>Jonathan Tan</name>
<email>jonathantanmy@google.com</email>
</author>
<published>2018-07-11T22:42:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e5c5ca27292d302b7ccf7e44c43d8b9474513867'/>
<id>urn:sha1:e5c5ca27292d302b7ccf7e44c43d8b9474513867</id>
<content type='text'>
Signed-off-by: Jonathan Tan &lt;jonathantanmy@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>commit-graph: add '--reachable' option</title>
<updated>2018-06-27T17:29:10Z</updated>
<author>
<name>Derrick Stolee</name>
<email>dstolee@microsoft.com</email>
</author>
<published>2018-06-27T13:24:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=59fb87701ff68eb114e54ce6834e91c4ae8f60a7'/>
<id>urn:sha1:59fb87701ff68eb114e54ce6834e91c4ae8f60a7</id>
<content type='text'>
When writing commit-graph files, it can be convenient to ask for all
reachable commits (starting at the ref set) in the resulting file. This
is particularly helpful when writing to stdin is complicated, such as a
future integration with 'git gc'.

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: use string-list API for input</title>
<updated>2018-06-27T17:29:10Z</updated>
<author>
<name>Derrick Stolee</name>
<email>dstolee@microsoft.com</email>
</author>
<published>2018-06-27T13:24:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d88b14b3fd691fc71c3cea5bc5bde9dd10b5e86c'/>
<id>urn:sha1:d88b14b3fd691fc71c3cea5bc5bde9dd10b5e86c</id>
<content type='text'>
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: add 'verify' subcommand</title>
<updated>2018-06-27T17:27:05Z</updated>
<author>
<name>Derrick Stolee</name>
<email>dstolee@microsoft.com</email>
</author>
<published>2018-06-27T13:24:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=283e68c72f49e6cfbae53cb5547d5b399ed25d1a'/>
<id>urn:sha1:283e68c72f49e6cfbae53cb5547d5b399ed25d1a</id>
<content type='text'>
If the commit-graph file becomes corrupt, we need a way to verify
that its contents match the object database. In the manner of
'git fsck' we will implement a 'git commit-graph verify' subcommand
to report all issues with the file.

Add the 'verify' subcommand to the 'commit-graph' builtin and its
documentation. The subcommand is currently a no-op except for
loading the commit-graph into memory, which may trigger run-time
errors that would be caught by normal use. Add a simple test that
ensures the command returns a zero error code.

If no commit-graph file exists, this is an acceptable state. Do
not report any errors.

Helped-by: Ramsay Jones &lt;ramsay@ramsayjones.plus.com&gt;
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: always load commit-graph information</title>
<updated>2018-05-22T03:36:34Z</updated>
<author>
<name>Derrick Stolee</name>
<email>dstolee@microsoft.com</email>
</author>
<published>2018-05-01T12:47:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e2838d85b6d35592ff5851d67f0232a78083ada7'/>
<id>urn:sha1:e2838d85b6d35592ff5851d67f0232a78083ada7</id>
<content type='text'>
Most code paths load commits using lookup_commit() and then
parse_commit(). In some cases, including some branch lookups, the commit
is parsed using parse_object_buffer() which side-steps parse_commit() in
favor of parse_commit_buffer().

With generation numbers in the commit-graph, we need to ensure that any
commit that exists in the commit-graph file has its generation number
loaded.

Create new load_commit_graph_info() method to fill in the information
for a commit that exists only in the commit-graph file. Call it from
parse_commit_buffer() after loading the other commit information from
the given buffer. Only fill this information when specified by the
'check_graph' parameter.

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