git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/1] commit-graph: define GIT_TEST_COMMIT_GRAPH

From
Stefan Beller <sbeller@google.com>
Date
Aug 28, 2018, 20:41 UTC
Message-ID
<CAGZ79kbsJXF=X7tzpdogAY7LdLd87YkPY0euiYaa3uQKQPoZuQ@mail.gmail.com>
In-Reply-To
<85d02ac8d8c9a8950ce1a9760a541ff506945de0.1535488400.git.gitgitgadget@gmail.com>

On Tue, Aug 28, 2018 at 1:33 PM Derrick Stolee via GitGitGadget <gitgitgadget@gmail.com> wrote:

Show 19 quoted lines
>
> From: Derrick Stolee <dstolee@microsoft.com>
>
> The commit-graph feature is tested in isolation by
> t5318-commit-graph.sh and t6600-test-reach.sh, but there are many
> more interesting scenarios involving commit walks. Many of these
> scenarios are covered by the existing test suite, but we need to
> maintain coverage when the optional commit-graph structure is not
> present.
>
> To allow running the full test suite with the commit-graph present,
> add a new test environment variable, GIT_TEST_COMMIT_GRAPH. Similar
> to GIT_TEST_SPLIT_INDEX, this variable makes every Git command try
> to load the commit-graph when parsing commits, and writes the
> commit-graph file after every 'git commit' command.
>
> There are a few tests that rely on commits not existing in
> pack-files to trigger important events, so manually set
> GIT_TEST_COMMIT_GRAPH to false for the necessary commands.

So the plan is to turn on the commit graph for the whole test suite excluding these selected tests?

Show 10 quoted lines
> diff --git a/t/t0410-partial-clone.sh b/t/t0410-partial-clone.sh
> index 4984ca583d..73d5284a91 100755
> --- a/t/t0410-partial-clone.sh
> +++ b/t/t0410-partial-clone.sh
> @@ -181,7 +181,7 @@ test_expect_success 'rev-list stops traversal at missing and promised commit' '
>
>         git -C repo config core.repositoryformatversion 1 &&
>         git -C repo config extensions.partialclone "arbitrary string" &&
> -       git -C repo rev-list --exclude-promisor-objects --objects bar >out &&
> +       GIT_TEST_COMMIT_GRAPH=0 git -C repo rev-list --exclude-promisor-objects --objects bar >out &&
> +               GIT_TEST_COMMIT_GRAPH=0 &&
> +               test_must_fail git merge -m final G

This could go on the same line without the && in between, setting the variable as a prefix.

Previous: Derrick Stolee via GitGitGadgetNext: Derrick Stolee
Message 3 of 18 in “Define GIT_TEST_COMMIT_GRAPH for commit-graph test coverage”
  1. 0/1 Define GIT_TEST_COMMIT_GRAPH for commit-graph test coverageDerrick Stolee via GitGitGadget, Aug 28, 2018
  2. 1/1 commit-graph: define GIT_TEST_COMMIT_GRAPHDerrick Stolee via GitGitGadget, Aug 28, 2018
  3. Stefan BellerAug 28, 2018
  4. Derrick StoleeAug 28, 2018
  5. Eric SunshineAug 28, 2018
  6. Derrick StoleeAug 29, 2018
  7. Ævar Arnfjörð BjarmasonOct 8, 2018
  8. Derrick StoleeOct 8, 2018
  9. Ævar Arnfjörð BjarmasonOct 8, 2018
  10. Derrick StoleeOct 8, 2018
  11. Junio C HamanoOct 9, 2018
  12. Stefan BellerAug 28, 2018
  13. Derrick StoleeAug 28, 2018
  14. 0/1 Define GIT_TEST_COMMIT_GRAPH for commit-graph test coverageDerrick Stolee via GitGitGadget, Aug 29, 2018
  15. 1/1 commit-graph: define GIT_TEST_COMMIT_GRAPHDerrick Stolee via GitGitGadget, Aug 29, 2018
  16. Duy NguyenSep 4, 2018
  17. Derrick StoleeSep 4, 2018
  18. Duy NguyenSep 4, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.