<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/builtin/commit-graph.c, branch v2.25.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.25.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.25.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2019-11-13T02:14:16Z</updated>
<entry>
<title>test-tool: use 'read-graph' helper</title>
<updated>2019-11-13T02:14:16Z</updated>
<author>
<name>Derrick Stolee</name>
<email>dstolee@microsoft.com</email>
</author>
<published>2019-11-12T16:58:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4bd0593e0f9149b0e72886c0a2d85bb22fc5404a'/>
<id>urn:sha1:4bd0593e0f9149b0e72886c0a2d85bb22fc5404a</id>
<content type='text'>
The 'git commit-graph read' subcommand is used in test scripts to check
that the commit-graph contents match the expected data. Mostly, this
helps check the header information and the list of chunks. Users do not
need this information, so move the functionality to a test helper.

Reported-by: Bryan Turner &lt;bturner@atlassian.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>Merge branch 'sg/commit-graph-usage-fix'</title>
<updated>2019-11-10T09:02:15Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-11-10T09:02:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=14b58c62bcd60b7b5bfbb895eb869f7d1d64a9b7'/>
<id>urn:sha1:14b58c62bcd60b7b5bfbb895eb869f7d1d64a9b7</id>
<content type='text'>
Message fix.

* sg/commit-graph-usage-fix:
  builtin/commit-graph.c: remove subcommand-less usage string
</content>
</entry>
<entry>
<title>builtin/commit-graph.c: remove subcommand-less usage string</title>
<updated>2019-10-28T03:24:17Z</updated>
<author>
<name>SZEDER Gábor</name>
<email>szeder.dev@gmail.com</email>
</author>
<published>2019-10-25T16:49:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8b656572ca1d5b4e917b7bf835c95ddb50a5282a'/>
<id>urn:sha1:8b656572ca1d5b4e917b7bf835c95ddb50a5282a</id>
<content type='text'>
The first line in 'git commit-graph's usage string indicates that this
command can be invoked without specifying a subcommand.  However, this
is not the case:

  $ git commit-graph
  usage: git commit-graph [--object-dir &lt;objdir&gt;]
     or: git commit-graph read [--object-dir &lt;objdir&gt;]
  [...]
  $ echo $?
  129

Remove this line from the usage string.

The synopsis in the manpage doesn't contain this line.

Signed-off-by: SZEDER Gábor &lt;szeder.dev@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<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>
</feed>
