<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/commit-graph.c, branch v2.23.0</title>
<subtitle>Fork of git SCM with my patches.</subtitle>
<id>http://git.kilabit.info/git/atom?h=v2.23.0</id>
<link rel='self' href='http://git.kilabit.info/git/atom?h=v2.23.0'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/'/>
<updated>2019-08-09T17:13:13Z</updated>
<entry>
<title>Merge branch 'ds/commit-graph-incremental'</title>
<updated>2019-08-09T17:13:13Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-08-09T17:13:13Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=203cf46fac096185701e50cdbf972ba6a67a10c8'/>
<id>urn:sha1:203cf46fac096185701e50cdbf972ba6a67a10c8</id>
<content type='text'>
Leakfix.

* ds/commit-graph-incremental:
  commit-graph: release strbufs after use
</content>
</entry>
<entry>
<title>commit-graph: release strbufs after use</title>
<updated>2019-08-07T19:24:01Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2019-08-07T11:15:02Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=0aa6bce7365c97ab1e26791ee03b3a83f7e784dd'/>
<id>urn:sha1:0aa6bce7365c97ab1e26791ee03b3a83f7e784dd</id>
<content type='text'>
Signed-off-by: René Scharfe &lt;l.s.r@web.de&gt;
Acked-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: fix bug around octopus merges</title>
<updated>2019-08-05T21:59:50Z</updated>
<author>
<name>Derrick Stolee</name>
<email>dstolee@microsoft.com</email>
</author>
<published>2019-08-05T16:43:41Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=a35bea40b674b21fbdb98d982e41c46d014ced83'/>
<id>urn:sha1:a35bea40b674b21fbdb98d982e41c46d014ced83</id>
<content type='text'>
In 1771be90 "commit-graph: merge commit-graph chains" (2019-06-18),
the method sort_and_scan_merged_commits() was added to merge the
commit lists of two commit-graph files in the incremental format.
Unfortunately, there was an off-by-one error in that method around
incrementing num_extra_edges, which leads to an incorrect offset
for the base graph chunk.

When we store an octopus merge in the commit-graph file, we store
the first parent in the normal place, but use the second parent
position to point into the "extra edges" chunk where the remaining
parents exist. This means we should be adding "num_parents - 1"
edges to this list, not "num_parents - 2". That is the basic error.

The reason this was not caught in the test suite is more subtle.
In 5324-split-commit-graph.sh, we test creating an octopus merge
and adding it to the tip of a commit-graph chain, then verify the
result. This _should_ have caught the problem, except that when
we load the commit-graph files we were overly careful to not fail
when the commit-graph chain does not match. This care was on
purpose to avoid race conditions as one process reads the chain
and another process modifies it. In such a case, the reading
process outputs the following message to stderr:

	warning: commit-graph chain does not match

These warnings are output in the test suite, but ignored. By
checking the stderr of `git commit-graph verify` to include
the expected progress output, it will now catch this error.

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>Merge branch 'ds/commit-graph-incremental'</title>
<updated>2019-07-19T18:30:20Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-07-19T18:30:20Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=92b1ea66b9a8f012a343ebc157c3441154e831f0'/>
<id>urn:sha1:92b1ea66b9a8f012a343ebc157c3441154e831f0</id>
<content type='text'>
The commits in a repository can be described by multiple
commit-graph files now, which allows the commit-graph files to be
updated incrementally.

* ds/commit-graph-incremental:
  commit-graph: test verify across alternates
  commit-graph: normalize commit-graph filenames
  commit-graph: test --split across alternate without --split
  commit-graph: test octopus merges with --split
  commit-graph: clean up chains after flattened write
  commit-graph: verify chains with --shallow mode
  commit-graph: create options for split files
  commit-graph: expire commit-graph files
  commit-graph: allow cross-alternate chains
  commit-graph: merge commit-graph chains
  commit-graph: add --split option to builtin
  commit-graph: write commit-graph chains
  commit-graph: rearrange chunk count logic
  commit-graph: add base graphs chunk
  commit-graph: load commit-graph chains
  commit-graph: rename commit_compare to oid_compare
  commit-graph: prepare for commit-graph chains
  commit-graph: document commit-graph chains
</content>
</entry>
<entry>
<title>Merge branch 'jk/oidhash'</title>
<updated>2019-07-09T22:25:43Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-07-09T22:25:43Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=a7db4c193d98f701eda0328dbf69b36f28dd22d3'/>
<id>urn:sha1:a7db4c193d98f701eda0328dbf69b36f28dd22d3</id>
<content type='text'>
Code clean-up to remove hardcoded SHA-1 hash from many places.

* jk/oidhash:
  hashmap: convert sha1hash() to oidhash()
  hash.h: move object_id definition from cache.h
  khash: rename oid helper functions
  khash: drop sha1-specific map types
  pack-bitmap: convert khash_sha1 maps into kh_oid_map
  delta-islands: convert island_marks khash to use oids
  khash: rename kh_oid_t to kh_oid_set
  khash: drop broken oid_map typedef
  object: convert create_object() to use object_id
  object: convert internal hash_obj() to object_id
  object: convert lookup_object() to use object_id
  object: convert lookup_unknown_object() to use object_id
  pack-objects: convert locate_object_entry_hash() to object_id
  pack-objects: convert packlist_find() to use object_id
  pack-bitmap-write: convert some helpers to use object_id
  upload-pack: rename a "sha1" variable to "oid"
  describe: fix accidental oid/hash type-punning
</content>
</entry>
<entry>
<title>Merge branch 'ds/close-object-store'</title>
<updated>2019-07-09T22:25:37Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-07-09T22:25:37Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=5cb7c73589059b557f0d690ed6bcfde46ef2d234'/>
<id>urn:sha1:5cb7c73589059b557f0d690ed6bcfde46ef2d234</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
</content>
</entry>
<entry>
<title>Merge branch 'ds/commit-graph-write-refactor'</title>
<updated>2019-07-09T22:25:36Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-07-09T22:25:36Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=e1168940ce11878261ece4602a7d8b8ee9a8c77e'/>
<id>urn:sha1:e1168940ce11878261ece4602a7d8b8ee9a8c77e</id>
<content type='text'>
Renamed from commit-graph-format-v2 and changed scope.

* ds/commit-graph-write-refactor:
  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>object: convert create_object() to use object_id</title>
<updated>2019-06-20T17:20:51Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2019-06-20T07:41:21Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=a378509e1c8d817b3abe42bd8b3c8aa2a6f9af8a'/>
<id>urn:sha1:a378509e1c8d817b3abe42bd8b3c8aa2a6f9af8a</id>
<content type='text'>
There are no callers left of create_object() that aren't just passing us
the "hash" member of a "struct object_id". Let's take the whole struct,
which gets us closer to removing all raw sha1 variables.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>commit-graph: normalize commit-graph filenames</title>
<updated>2019-06-20T03:46:27Z</updated>
<author>
<name>Derrick Stolee</name>
<email>dstolee@microsoft.com</email>
</author>
<published>2019-06-18T18:14:36Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=16110c9348fc2022e78f2581968cf428c056dc5b'/>
<id>urn:sha1:16110c9348fc2022e78f2581968cf428c056dc5b</id>
<content type='text'>
When writing commit-graph files, we append path data to an
object directory, which may be specified by the user via the
'--object-dir' option. If the user supplies a trailing slash,
or some other alternative path format, the resulting path may
be usable for writing to the correct location. However, when
expiring graph files from the &lt;obj-dir&gt;/info/commit-graphs
directory during a write, we need to compare paths with exact
string matches.

Normalize the commit-graph filenames to avoid ambiguity. This
creates extra allocations, but this is a constant multiple of
the number of commit-graph files, which should be a number in
the single digits.

Further normalize the object directory in the context. Due to
a comparison between g-&gt;obj_dir and ctx-&gt;obj_dir in
split_graph_merge_strategy(), a trailing slash would prevent
any merging of layers within the same object directory. The
check is there to ensure we do not merge across alternates.
Update the tests to include a case with this trailing slash
problem.

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: clean up chains after flattened write</title>
<updated>2019-06-20T03:46:26Z</updated>
<author>
<name>Derrick Stolee</name>
<email>dstolee@microsoft.com</email>
</author>
<published>2019-06-18T18:14:33Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=ba41112a6331e8b454cac6cfd3ee67ae93957a2c'/>
<id>urn:sha1:ba41112a6331e8b454cac6cfd3ee67ae93957a2c</id>
<content type='text'>
If we write a commit-graph file without the split option, then
we write to $OBJDIR/info/commit-graph and start to ignore
the chains in $OBJDIR/info/commit-graphs/.

Unlink the commit-graph-chain file and expire the graph-{hash}.graph
files in $OBJDIR/info/commit-graphs/ during every write.

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