<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/builtin/commit-graph.c, branch v2.24.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.24.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.24.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2019-10-15T04:48:00Z</updated>
<entry>
<title>Merge branch 'gs/commit-graph-trace-with-cmd'</title>
<updated>2019-10-15T04:48:00Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-10-15T04:48:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ccc289915af00b44346cbf007f4f82ec2131f1a1'/>
<id>urn:sha1:ccc289915af00b44346cbf007f4f82ec2131f1a1</id>
<content type='text'>
Dev support.

* gs/commit-graph-trace-with-cmd:
  commit-graph: emit trace2 cmd_mode for each sub-command
</content>
</entry>
<entry>
<title>Merge branch 'gs/commit-graph-progress'</title>
<updated>2019-10-07T02:32:57Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-10-07T02:32:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=caf150ce7d60e4070292226ec208478b801b8d4b'/>
<id>urn:sha1:caf150ce7d60e4070292226ec208478b801b8d4b</id>
<content type='text'>
* gs/commit-graph-progress:
  commit-graph: add --[no-]progress to write and verify
</content>
</entry>
<entry>
<title>Merge branch 'jk/commit-graph-cleanup'</title>
<updated>2019-10-07T02:32:55Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-10-07T02:32:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=cda8faa37e997f5db3458c1454ffe70f5c460d2a'/>
<id>urn:sha1:cda8faa37e997f5db3458c1454ffe70f5c460d2a</id>
<content type='text'>
A pair of small fixups to "git commit-graph" have been applied.

* jk/commit-graph-cleanup:
  commit-graph: turn off save_commit_buffer
  commit-graph: don't show progress percentages while expanding reachable commits
</content>
</entry>
<entry>
<title>commit-graph: emit trace2 cmd_mode for each sub-command</title>
<updated>2019-10-02T09:36:19Z</updated>
<author>
<name>Garima Singh</name>
<email>garima.singh@microsoft.com</email>
</author>
<published>2019-08-27T16:56:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0bd7f578b2ff8b622cb8db7a572aa68303162b2b'/>
<id>urn:sha1:0bd7f578b2ff8b622cb8db7a572aa68303162b2b</id>
<content type='text'>
Emit trace2_cmd_mode() messages for each commit-graph
sub-command.

The commit graph commands were in flux when trace2 was
making it's way to git. Now that we have enough sub-commands
in commit-graph, we can label the various modes within them.
Distinguishing between read, write and verify is a great
start.

Signed-off-by: Garima Singh &lt;garima.singh@microsoft.com&gt;
Acked-by: Jeff Hostetler &lt;jeffhost@microsoft.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>commit-graph: add --[no-]progress to write and verify</title>
<updated>2019-09-18T21:23:09Z</updated>
<author>
<name>Garima Singh</name>
<email>garima.singh@microsoft.com</email>
</author>
<published>2019-08-26T16:29:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7371612255492f062ee905e6d88c6234c6d4752a'/>
<id>urn:sha1:7371612255492f062ee905e6d88c6234c6d4752a</id>
<content type='text'>
Add --[no-]progress to git commit-graph write and verify.
The progress feature was introduced in 7b0f229
("commit-graph write: add progress output", 2018-09-17) but
the ability to opt-out was overlooked.

Signed-off-by: Garima Singh &lt;garima.singh@microsoft.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>commit-graph: turn off save_commit_buffer</title>
<updated>2019-09-09T17:56:50Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2019-09-07T05:04:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=dd2e50a84ea431a6cec69f37251f29bf3cfcbb68'/>
<id>urn:sha1:dd2e50a84ea431a6cec69f37251f29bf3cfcbb68</id>
<content type='text'>
The commit-graph tool may read a lot of commits, but it only cares about
parsing their metadata (parents, trees, etc) and doesn't ever show the
messages to the user. And so it should not need save_commit_buffer,
which is meant for holding onto the object data of parsed commits so
that we can show them later. In fact, it's quite harmful to do so.
According to massif, the max heap of "git commit-graph write
--reachable" in linux.git before/after this patch (removing the commit
graph file in between) goes from ~1.1GB to ~270MB.

Which isn't surprising, since the difference is about the sum of the
uncompressed sizes of all commits in the repository, and this was
equivalent to leaking them.

This obviously helps if you're under memory pressure, but even without
it, things go faster. My before/after times for that command (without
massif) went from 12.521s to 11.874s, a speedup of ~5%.

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: error out on invalid commit oids in 'write --stdin-commits'</title>
<updated>2019-08-05T21:33:39Z</updated>
<author>
<name>SZEDER Gábor</name>
<email>szeder.dev@gmail.com</email>
</author>
<published>2019-08-05T08:02:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7c5c9b9c57d58273d17dfc3fec3ebdb25077a9de'/>
<id>urn:sha1:7c5c9b9c57d58273d17dfc3fec3ebdb25077a9de</id>
<content type='text'>
While 'git commit-graph write --stdin-commits' expects commit object
ids as input, it accepts and silently skips over any invalid commit
object ids, and still exits with success:

  # nonsense
  $ echo not-a-commit-oid | git commit-graph write --stdin-commits
  $ echo $?
  0
  # sometimes I forgot that refs are not good...
  $ echo HEAD | git commit-graph write --stdin-commits
  $ echo $?
  0
  # valid tree OID, but not a commit OID
  $ git rev-parse HEAD^{tree} | git commit-graph write --stdin-commits
  $ echo $?
  0
  $ ls -l .git/objects/info/commit-graph
  ls: cannot access '.git/objects/info/commit-graph': No such file or directory

Check that all input records are indeed valid commit object ids and
return with error otherwise, the same way '--stdin-packs' handles
invalid input; see e103f7276f (commit-graph: return with errors during
write, 2019-06-12).

Note that it should only return with error when encountering an
invalid commit object id coming from standard input.  However,
'--reachable' uses the same code path to process object ids pointed to
by all refs, and that includes tag object ids as well, which should
still be skipped over.  Therefore add a new flag to 'enum
commit_graph_write_flags' and a corresponding field to 'struct
write_commit_graph_context', so we can differentiate between those two
cases.

Signed-off-by: SZEDER Gábor &lt;szeder.dev@gmail.com&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: turn a group of write-related macro flags into an enum</title>
<updated>2019-08-05T21:31:24Z</updated>
<author>
<name>SZEDER Gábor</name>
<email>szeder.dev@gmail.com</email>
</author>
<published>2019-08-05T08:02:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=39d88318569188c0544c3c0f8207f2e1b1829e60'/>
<id>urn:sha1:39d88318569188c0544c3c0f8207f2e1b1829e60</id>
<content type='text'>
Signed-off-by: SZEDER Gábor &lt;szeder.dev@gmail.com&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: verify chains with --shallow mode</title>
<updated>2019-06-20T03:46:26Z</updated>
<author>
<name>Derrick Stolee</name>
<email>dstolee@microsoft.com</email>
</author>
<published>2019-06-18T18:14:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3da4b609bb14b13672f64af908706462617f53cb'/>
<id>urn:sha1:3da4b609bb14b13672f64af908706462617f53cb</id>
<content type='text'>
If we wrote a commit-graph chain, we only modified the tip file in
the chain. It is valuable to verify what we wrote, but not waste
time checking files we did not write.

Add a '--shallow' option to the 'git commit-graph verify' subcommand
and check that it does not read the base graph in a two-file chain.

Making the verify subcommand read from a chain of commit-graphs takes
some rearranging of the builtin code.

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 options for split files</title>
<updated>2019-06-20T03:46:26Z</updated>
<author>
<name>Derrick Stolee</name>
<email>dstolee@microsoft.com</email>
</author>
<published>2019-06-18T18:14:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c2bc6e6ab0ade70c475a73d06326e677e70840d2'/>
<id>urn:sha1:c2bc6e6ab0ade70c475a73d06326e677e70840d2</id>
<content type='text'>
The split commit-graph feature is now fully implemented, but needs
some more run-time configurability. Allow direct callers to 'git
commit-graph write --split' to specify the values used in the
merge strategy and the expire time.

Update the documentation to specify these values.

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