<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/t/t5318-commit-graph.sh, branch gitk-resize-error</title>
<subtitle>Fork of git SCM with my patches.</subtitle>
<id>http://git.kilabit.info/git/atom?h=gitk-resize-error</id>
<link rel='self' href='http://git.kilabit.info/git/atom?h=gitk-resize-error'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/'/>
<updated>2021-12-13T18:29:48Z</updated>
<entry>
<title>t5000-t5999: detect and signal failure within loop</title>
<updated>2021-12-13T18:29:48Z</updated>
<author>
<name>Eric Sunshine</name>
<email>sunshine@sunshineco.com</email>
</author>
<published>2021-12-09T05:11:14Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=d0fd993137cf41be66b54628f124b6651eea0bd2'/>
<id>urn:sha1:d0fd993137cf41be66b54628f124b6651eea0bd2</id>
<content type='text'>
Failures within `for` and `while` loops can go unnoticed if not detected
and signaled manually since the loop itself does not abort when a
contained command fails, nor will a failure necessarily be detected when
the loop finishes since the loop returns the exit code of the last
command it ran on the final iteration, which may not be the command
which failed. Therefore, detect and signal failures manually within
loops using the idiom `|| return 1` (or `|| exit 1` within subshells).

Signed-off-by: Eric Sunshine &lt;sunshine@sunshineco.com&gt;
Reviewed-by: Elijah Newren &lt;newren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>fsck: verify commit graph when implicitly enabled</title>
<updated>2021-10-15T21:30:07Z</updated>
<author>
<name>Glen Choo</name>
<email>chooglen@google.com</email>
</author>
<published>2021-10-15T20:16:29Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=f30e4d854bb8462d1a4da697ad95501d33fe4425'/>
<id>urn:sha1:f30e4d854bb8462d1a4da697ad95501d33fe4425</id>
<content type='text'>
Change fsck to check the "core_commit_graph" variable set in
"repo-settings.c" instead of reading the "core.commitGraph" variable.
This fixes a bug where we wouldn't verify the commit-graph if the
config key was missing. This bug was introduced in
31b1de6a09 (commit-graph: turn on commit-graph by default, 2019-08-13),
where core.commitGraph was turned on by default.

Add tests to "t5318-commit-graph.sh" to verify that fsck checks the
commit-graph as expected for the 3 values of core.commitGraph. Also,
disable GIT_TEST_COMMIT_GRAPH in t/t0410-partial-clone.sh because some
test cases use fsck in ways that assume that commit-graph checking is
disabled.

Helped-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Glen Choo &lt;chooglen@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ab/ignore-replace-while-working-on-commit-graph' into gc/use-repo-settings</title>
<updated>2021-10-15T21:30:00Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-10-15T21:30:00Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=ed41385ad65ebf5d6341db96728be357dde3194d'/>
<id>urn:sha1:ed41385ad65ebf5d6341db96728be357dde3194d</id>
<content type='text'>
* ab/ignore-replace-while-working-on-commit-graph:
  commit-graph: don't consider "replace" objects with "verify"
  commit-graph tests: fix another graph_git_two_modes() helper
  commit-graph tests: fix error-hiding graph_git_two_modes() helper
</content>
</entry>
<entry>
<title>commit-graph: don't consider "replace" objects with "verify"</title>
<updated>2021-10-15T16:21:30Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2021-10-14T23:37:16Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=095d112f8cce6610bb4ed112a5318d4379322b55'/>
<id>urn:sha1:095d112f8cce6610bb4ed112a5318d4379322b55</id>
<content type='text'>
Extend the code added in d6538246d3d (commit-graph: not compatible
with replace objects, 2018-08-20) which ignored replace objects in the
"write" command to ignore it in the "verify" command too.

We can just move this assignment to the cmd_commit_graph(), it
dispatches to "write" and "verify", and we're unlikely to ever get a
sub-command that would like to consider replace refs.

This will make tests added in eddc1f556cd (mktag tests: test
update-ref and reachable fsck, 2021-06-17) pass in combination with
the "GIT_TEST_COMMIT_GRAPH" mode added in 859fdc0c3cf (commit-graph:
define GIT_TEST_COMMIT_GRAPH, 2018-08-29), except that mode is
currently broken (but is being fixed concurrently). See the discussion
starting at [1].

1. https://lore.kernel.org/git/87wnmihswp.fsf@evledraar.gmail.com/

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>commit-graph tests: fix error-hiding graph_git_two_modes() helper</title>
<updated>2021-10-15T16:21:30Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2021-10-14T23:37:14Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=3247919a758710692e316a13c209e13933936d51'/>
<id>urn:sha1:3247919a758710692e316a13c209e13933936d51</id>
<content type='text'>
The graph_git_two_modes() helper added in 177722b3442 (commit:
integrate commit graph with commit parsing, 2018-04-10) didn't
&amp;&amp;-chain its "git commit-graph" invocations, which as can be seen with
SANITIZE=leak will happily mark tests as passing if both of these
commands die, since test_cmp() will be comparing two empty files.

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>commit-graph: show "unexpected subcommand" error</title>
<updated>2021-08-31T00:06:18Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2021-08-23T12:30:21Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=367c5f36a6a0fa7f8f706b10f9bb2f0e28baaa1a'/>
<id>urn:sha1:367c5f36a6a0fa7f8f706b10f9bb2f0e28baaa1a</id>
<content type='text'>
Bring the "commit-graph" command in line with the error output and
general pattern in cmd_multi_pack_index().

Let's test for that output, and also cover the same potential bug as
was fixed in the multi-pack-index command in
88617d11f9d (multi-pack-index: fix potential segfault without
sub-command, 2021-07-19).

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Reviewed-by: Taylor Blau &lt;me@ttaylorr.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>commit-graph: show usage on "commit-graph [write|verify] garbage"</title>
<updated>2021-08-31T00:06:18Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2021-08-23T12:30:20Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=6d209a01f89fd27d42e0a74a5ada29cef1dcac29'/>
<id>urn:sha1:6d209a01f89fd27d42e0a74a5ada29cef1dcac29</id>
<content type='text'>
Change the parse_options() invocation in the commit-graph code to
error on unknown leftover argv elements, in addition to the existing
and implicit erroring via parse_options() on unknown options.

We'd already error in cmd_commit_graph() on e.g.:

    git commit-graph unknown verify
    git commit-graph --unknown verify

But here we're calling parse_options() twice more for the "write" and
"verify" subcommands. We did not do the same checking for leftover
argv elements there. As a result we'd silently accept garbage in these
subcommands, let's not do that.

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Reviewed-by: Taylor Blau &lt;me@ttaylorr.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ds/commit-graph-generation-config'</title>
<updated>2021-03-22T21:00:23Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-03-22T21:00:23Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=d20fa3cf9dba095b9d8836b177da697425ce8d3c'/>
<id>urn:sha1:d20fa3cf9dba095b9d8836b177da697425ce8d3c</id>
<content type='text'>
A new configuration variable has been introduced to allow choosing
which version of the generation number gets used in the
commit-graph file.

* ds/commit-graph-generation-config:
  commit-graph: use config to specify generation type
  commit-graph: create local repository pointer
</content>
</entry>
<entry>
<title>Merge branch 'ds/chunked-file-api'</title>
<updated>2021-03-01T22:02:57Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-03-01T22:02:57Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=660dd97a62da66ffe95df20a9e27a01e39ae473f'/>
<id>urn:sha1:660dd97a62da66ffe95df20a9e27a01e39ae473f</id>
<content type='text'>
The common code to deal with "chunked file format" that is shared
by the multi-pack-index and commit-graph files have been factored
out, to help codepaths for both filetypes to become more robust.

* ds/chunked-file-api:
  commit-graph.c: display correct number of chunks when writing
  chunk-format: add technical docs
  chunk-format: restore duplicate chunk checks
  midx: use 64-bit multiplication for chunk sizes
  midx: use chunk-format read API
  commit-graph: use chunk-format read API
  chunk-format: create read chunk API
  midx: use chunk-format API in write_midx_internal()
  midx: drop chunk progress during write
  midx: return success/failure in chunk write methods
  midx: add num_large_offsets to write_midx_context
  midx: add pack_perm to write_midx_context
  midx: add entries to write_midx_context
  midx: use context in write_midx_pack_names()
  midx: rename pack_info to write_midx_context
  commit-graph: use chunk-format write API
  chunk-format: create chunk format write API
  commit-graph: anonymize data in chunk_write_fn
</content>
</entry>
<entry>
<title>commit-graph: use config to specify generation type</title>
<updated>2021-02-25T23:10:41Z</updated>
<author>
<name>Derrick Stolee</name>
<email>dstolee@microsoft.com</email>
</author>
<published>2021-02-25T18:19:43Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=702110aac63556b4572d9c7b65c9123ec8038ebf'/>
<id>urn:sha1:702110aac63556b4572d9c7b65c9123ec8038ebf</id>
<content type='text'>
We have two established generation number versions:

 1: topological levels
 2: corrected commit dates

The corrected commit dates are enabled by default, but they also write
extra data in the GDAT and GDOV chunks. Services that host Git data
might want to have more control over when this feature rolls out than
just updating the Git binaries.

Add a new "commitGraph.generationVersion" config option that specifies
the intended generation number version. If this value is less than 2,
then the GDAT chunk is never written _or read_ from an existing file.

This can replace our use of the GIT_TEST_COMMIT_GRAPH_NO_GDAT
environment variable in the test suite. Remove it.

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