From: Taylor Blau <me@ttaylorr.com>
To: git@vger.kernel.org
Cc: Derrick Stolee <derrickstolee@github.com>,
Junio C Hamano <gitster@pobox.com>,
Eric Sunshine <sunshine@sunshineco.com>
Subject: [PATCH v2 0/5] commit-graph: test cleanup and modernization
Date: Mon, 24 Jul 2023 12:39:19 -0400 [thread overview]
Message-ID: <cover.1690216758.git.me@ttaylorr.com> (raw)
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
next prev parent reply other threads:[~2023-07-24 16:39 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-21 17:30 [PATCH 0/5] commit-graph: test cleanup and modernization Taylor Blau
2023-07-21 17:30 ` [PATCH 1/5] t/lib-commit-graph.sh: allow `graph_read_expect()` in sub-directories Taylor Blau
2023-07-21 17:41 ` Eric Sunshine
2023-07-21 18:33 ` Taylor Blau
2023-07-21 18:54 ` Junio C Hamano
2023-07-21 17:30 ` [PATCH 2/5] t/lib-commit-graph.sh: avoid directory change in `graph_git_behavior()` Taylor Blau
2023-07-21 18:01 ` Eric Sunshine
2023-07-21 18:39 ` Taylor Blau
2023-07-21 19:02 ` Junio C Hamano
2023-07-21 17:30 ` [PATCH 3/5] t5318: avoid top-level directory changes Taylor Blau
2023-07-21 18:28 ` Eric Sunshine
2023-07-21 17:30 ` [PATCH 4/5] t5328: " Taylor Blau
2023-07-21 17:30 ` [PATCH 5/5] t/lib-commit-graph.sh: avoid sub-shell in `graph_git_behavior()` Taylor Blau
2023-07-21 18:34 ` [PATCH 0/5] commit-graph: test cleanup and modernization Eric Sunshine
2023-07-21 22:35 ` Junio C Hamano
2023-07-24 16:39 ` Taylor Blau [this message]
2023-07-24 16:39 ` [PATCH v2 1/5] t/lib-commit-graph.sh: allow `graph_read_expect()` in sub-directories Taylor Blau
2023-07-24 16:39 ` [PATCH v2 2/5] t/lib-commit-graph.sh: avoid directory change in `graph_git_behavior()` Taylor Blau
2023-07-24 16:39 ` [PATCH v2 3/5] t5318: avoid top-level directory changes Taylor Blau
2023-07-24 21:48 ` Junio C Hamano
2023-07-24 16:39 ` [PATCH v2 4/5] t5328: " Taylor Blau
2023-07-24 16:39 ` [PATCH v2 5/5] t/lib-commit-graph.sh: avoid sub-shell in `graph_git_behavior()` Taylor Blau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1690216758.git.me@ttaylorr.com \
--to=me@ttaylorr.com \
--cc=derrickstolee@github.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=sunshine@sunshineco.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).