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

[PATCH v2 0/5] commit-graph: test cleanup and modernization

From
Taylor Blau <me@ttaylorr.com>
Date
Jul 24, 2023, 16:39 UTC
Message-ID
<cover.1690216758.git.me@ttaylorr.com>
In-Reply-To
<cover.1689960606.git.me@ttaylorr.com>

Here is a reroll of my series to address a few style nitpicks in the commit-graph tests.

Much is the same from the previous round, except for:
  - quotes >"$DIR/expect" to ensure that we work on all shells>
  - adds a NOTE above graph_git_behavior to indicate that its second
    argument cannot contain any character in $IFS.
  - rebased on top of the current tip of 'master'.

As usual, a range-diff is available below. Thanks in advance for your review!

Taylor Blau (5):
  t/lib-commit-graph.sh: allow `graph_read_expect()` in sub-directories
  t/lib-commit-graph.sh: avoid directory change in
    `graph_git_behavior()`
  t5318: avoid top-level directory changes
  t5328: avoid top-level directory changes
  t/lib-commit-graph.sh: avoid sub-shell in `graph_git_behavior()`
 t/lib-commit-graph.sh              |  34 ++-
 t/t5318-commit-graph.sh            | 378 +++++++++++++----------------
 t/t5328-commit-graph-64bit-time.sh |  54 ++---
 3 files changed, 224 insertions(+), 242 deletions(-)
Range-diff against v1:
1:  08482212630 ! 1:  c81a059c181 t/lib-commit-graph.sh: allow `graph_read_expect()` in sub-directories
    @@ t/lib-commit-graph.sh: graph_read_expect() {
      		OPTIONS=" read_generation_data"
      	fi
     -	cat >expect <<- EOF
    -+	cat >$DIR/expect <<- EOF
    ++	cat >"$DIR/expect" <<-EOF
      	header: 43475048 1 $(test_oid oid_version) $NUM_CHUNKS 0
      	num_commits: $1
      	chunks: oid_fanout oid_lookup commit_metadata$OPTIONAL
2:  715a160903b ! 2:  115df6fe226 t/lib-commit-graph.sh: avoid directory change in `graph_git_behavior()`
    @@ Commit message
         Signed-off-by: Taylor Blau <me@ttaylorr.com>
     
      ## t/lib-commit-graph.sh ##
    -@@ t/lib-commit-graph.sh: graph_git_behavior() {
    +@@ t/lib-commit-graph.sh: graph_git_two_modes() {
    + 	test_cmp expect output
    + }
    + 
    ++# graph_git_behavior <name> <directory> <branch> <compare>
    ++#
    ++# Ensures that a handful of traversal operations produce the same
    ++# results with and without the commit-graph in use.
    ++#
    ++# NOTE: it is a bug to call this function with <directory> containing
    ++# any characters in $IFS.
    + graph_git_behavior() {
    + 	MSG=$1
    + 	DIR=$2
      	BRANCH=$3
      	COMPARE=$4
      	test_expect_success "check normal git operations: $MSG" '
3:  451ec003be8 = 3:  12ce967bafe t5318: avoid top-level directory changes
4:  ba550987055 = 4:  79b3444660f t5328: avoid top-level directory changes
5:  c3432f27b94 = 5:  887006eab46 t/lib-commit-graph.sh: avoid sub-shell in `graph_git_behavior()`
-- 
2.41.0.399.g887006eab46
Previous: Junio C HamanoNext: Taylor Blau
Message 16 of 22 in “commit-graph: test cleanup and modernization”
  1. 0/5 commit-graph: test cleanup and modernizationTaylor Blau, Jul 21, 2023
  2. 1/5 t/lib-commit-graph.sh: allow `graph_read_expect()` in sub-directoriesTaylor Blau, Jul 21, 2023
  3. Eric SunshineJul 21, 2023
  4. Taylor BlauJul 21, 2023
  5. Junio C HamanoJul 21, 2023
  6. 4/5 t5328: avoid top-level directory changesTaylor Blau, Jul 21, 2023
  7. 3/5 t5318: avoid top-level directory changesTaylor Blau, Jul 21, 2023
  8. Eric SunshineJul 21, 2023
  9. 2/5 t/lib-commit-graph.sh: avoid directory change in `graph_git_behavior()`Taylor Blau, Jul 21, 2023
  10. Eric SunshineJul 21, 2023
  11. Taylor BlauJul 21, 2023
  12. Junio C HamanoJul 21, 2023
  13. 5/5 t/lib-commit-graph.sh: avoid sub-shell in `graph_git_behavior()`Taylor Blau, Jul 21, 2023
  14. Eric SunshineJul 21, 2023
  15. Junio C HamanoJul 21, 2023
  16. 0/5 commit-graph: test cleanup and modernizationTaylor Blau, Jul 24, 2023
  17. 1/5 t/lib-commit-graph.sh: allow `graph_read_expect()` in sub-directoriesTaylor Blau, Jul 24, 2023
  18. 2/5 t/lib-commit-graph.sh: avoid directory change in `graph_git_behavior()`Taylor Blau, Jul 24, 2023
  19. 3/5 t5318: avoid top-level directory changesTaylor Blau, Jul 24, 2023
  20. Junio C HamanoJul 24, 2023
  21. 5/5 t/lib-commit-graph.sh: avoid sub-shell in `graph_git_behavior()`Taylor Blau, Jul 24, 2023
  22. 4/5 t5328: avoid top-level directory changesTaylor Blau, Jul 24, 2023

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.