From: "Derrick Stolee via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: pclouds@gmail.com, Junio C Hamano <gitster@pobox.com>
Subject: [PATCH v2 0/1] Define GIT_TEST_COMMIT_GRAPH for commit-graph test coverage
Date: Wed, 29 Aug 2018 05:49:02 -0700 (PDT) [thread overview]
Message-ID: <pull.26.v2.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.26.git.gitgitgadget@gmail.com>
The commit-graph (and multi-pack-index) features are optional data
structures that can make Git operations faster. Since they are optional, we
do not enable them in most Git tests. The commit-graph is tested in
t5318-commit-graph.sh (and t6600-test-reach.sh in ds/reachable), but that
one script cannot cover the data shapes present in the rest of the test
suite.
This patch introduces a new test environment variable, GIT_TEST_COMMIT_GRAPH
. Similar to GIT_TEST_SPLIT_INDEX, it enables the commit-graph and writes it
with every git commit command. Thanks, Duy, for pointing out this direction
[1].
A few tests needed to be modified. These are the same tests that were
mentioned in my previous example patch [2]. Thanks, Eric, for providing the
correct way to override the settings [3].
When this merges down, I'll create a CI build in VSTS that runs the test
suite with this option enabled.
Thanks, -Stolee
[1]
https://public-inbox.org/git/CACsJy8CKnXVJYkKM_W=N=Vq-TVXf+YCqZP_uP7B-dN_6xddB=g@mail.gmail.com/
Re: [PATCH 0/9] multi-pack-index cleanups (Discussing test environment
variables)
[2]
https://public-inbox.org/git/20180718152244.45513-1-dstolee@microsoft.com/
[PATCH] DO-NOT-MERGE: write and read commit-graph always
[3]
https://public-inbox.org/git/CAPig+cSjanDi=jV75PdzYpAjwVgd4Suh3UyvY+Vy7yeHAuY8RA@mail.gmail.com/
Based-On: ds/commit-graph-with-grafts Cc: jnareb@gmail.comCc:
sbeller@google.comCc: sunshine@sunshineco.com
Derrick Stolee (1):
commit-graph: define GIT_TEST_COMMIT_GRAPH
builtin/commit.c | 4 ++++
commit-graph.c | 5 +++--
commit-graph.h | 2 ++
t/README | 4 ++++
t/t0410-partial-clone.sh | 2 +-
t/t5307-pack-missing-commit.sh | 4 ++--
t/t6011-rev-list-with-bad-commit.sh | 7 +++----
t/t6024-recursive-merge.sh | 6 +++---
8 files changed, 22 insertions(+), 12 deletions(-)
base-commit: 829a321569d8e8f2c582aef9f0c990df976ab842
Published-As: https://github.com/gitgitgadget/git/releases/tags/pr-26%2Fderrickstolee%2Fshallow%2Ftest-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-26/derrickstolee/shallow/test-v2
Pull-Request: https://github.com/gitgitgadget/git/pull/26
Range-diff vs v1:
1: 85d02ac8d8 ! 1: 4ff6695c7e commit-graph: define GIT_TEST_COMMIT_GRAPH
@@ -23,6 +23,7 @@
merge-base algorithm picking one of two ambiguous merge-bases, and
the commit-graph feature changes which merge-base is picked.
+ Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
diff --git a/builtin/commit.c b/builtin/commit.c
@@ -112,18 +113,12 @@
test_expect_success 'rev-list notices corruption (1)' '
- test_must_fail git rev-list HEAD
-+ (
-+ GIT_TEST_COMMIT_GRAPH=0 &&
-+ test_must_fail git rev-list HEAD
-+ )
++ test_must_fail env GIT_TEST_COMMIT_GRAPH=0 git rev-list HEAD
'
test_expect_success 'rev-list notices corruption (2)' '
- test_must_fail git rev-list --objects HEAD
-+ (
-+ GIT_TEST_COMMIT_GRAPH=0 &&
-+ test_must_fail git rev-list --objects HEAD
-+ )
++ test_must_fail env GIT_TEST_COMMIT_GRAPH=0 git rev-list --objects HEAD
'
test_expect_success 'pack-objects notices corruption' '
@@ -140,10 +135,7 @@
- test_must_fail git rev-list --all > /dev/null
- '
+test_expect_success 'rev-list should fail' '
-+ (
-+ GIT_TEST_COMMIT_GRAPH=0 &&
-+ test_must_fail git rev-list --all > /dev/null
-+ )
++ test_must_fail env GIT_TEST_COMMIT_GRAPH=0 git rev-list --all > /dev/null
+'
test_expect_success 'git repack _MUST_ fail' \
@@ -160,10 +152,7 @@
- test_must_fail git merge -m final G
-"
+test_expect_success 'combined merge conflicts' '
-+ (
-+ GIT_TEST_COMMIT_GRAPH=0 &&
-+ test_must_fail git merge -m final G
-+ )
++ test_must_fail env GIT_TEST_COMMIT_GRAPH=0 git merge -m final G
+'
cat > expect << EOF
--
gitgitgadget
next prev parent reply other threads:[~2018-08-29 12:49 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-28 20:33 [PATCH 0/1] Define GIT_TEST_COMMIT_GRAPH for commit-graph test coverage Derrick Stolee via GitGitGadget
2018-08-28 20:33 ` [PATCH 1/1] commit-graph: define GIT_TEST_COMMIT_GRAPH Derrick Stolee via GitGitGadget
2018-08-28 20:41 ` Stefan Beller
2018-08-28 21:31 ` Derrick Stolee
2018-08-28 21:59 ` Eric Sunshine
2018-08-29 12:14 ` Derrick Stolee
2018-10-08 13:43 ` Ævar Arnfjörð Bjarmason
2018-10-08 14:45 ` Derrick Stolee
2018-10-08 14:58 ` Ævar Arnfjörð Bjarmason
2018-10-08 15:01 ` Derrick Stolee
2018-10-09 5:53 ` Junio C Hamano
2018-08-28 20:37 ` [PATCH 0/1] Define GIT_TEST_COMMIT_GRAPH for commit-graph test coverage Stefan Beller
2018-08-28 21:32 ` Derrick Stolee
2018-08-29 12:49 ` Derrick Stolee via GitGitGadget [this message]
2018-08-29 12:49 ` [PATCH v2 1/1] commit-graph: define GIT_TEST_COMMIT_GRAPH Derrick Stolee via GitGitGadget
2018-09-04 16:49 ` [PATCH v2 0/1] Define GIT_TEST_COMMIT_GRAPH for commit-graph test coverage Duy Nguyen
2018-09-04 17:12 ` Derrick Stolee
2018-09-04 17:18 ` Duy Nguyen
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=pull.26.v2.git.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=pclouds@gmail.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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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).