summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2021-09-21 13:19:10 -0400
committerGitHub <noreply@github.com>2021-09-21 13:19:10 -0400
commitefa0d64e03c705bdbdfe56f0cac210322b76702e (patch)
tree997b65081942998b01e2fc2510bbb6ee7c807ddf /tests
parentabd8142c4afbe8ceca579305efd8f9f9958cd7ed (diff)
parent90656858ce6ec0f4cba5ba5f8690ace9b83161d0 (diff)
downloadlibgit2-efa0d64e03c705bdbdfe56f0cac210322b76702e.tar.gz
Merge pull request #6067 from libgit2/ethomson/filter_commit_id
filter: use a `git_oid` in filter options, not a pointer
Diffstat (limited to 'tests')
-rw-r--r--tests/filter/bare.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/tests/filter/bare.c b/tests/filter/bare.c
index f8e34232f..8402638ce 100644
--- a/tests/filter/bare.c
+++ b/tests/filter/bare.c
@@ -137,13 +137,10 @@ void test_filter_bare__from_specific_commit_one(void)
git_blob_filter_options opts = GIT_BLOB_FILTER_OPTIONS_INIT;
git_blob *blob;
git_buf buf = { 0 };
- git_oid commit_id;
-
- cl_git_pass(git_oid_fromstr(&commit_id, "b8986fec0f7bde90f78ac72706e782d82f24f2f0"));
opts.flags |= GIT_BLOB_FILTER_NO_SYSTEM_ATTRIBUTES;
opts.flags |= GIT_BLOB_FILTER_ATTRIBUTES_FROM_COMMIT;
- opts.commit_id = &commit_id;
+ cl_git_pass(git_oid_fromstr(&opts.attr_commit_id, "b8986fec0f7bde90f78ac72706e782d82f24f2f0"));
cl_git_pass(git_revparse_single(
(git_object **)&blob, g_repo, "055c872")); /* ident */
@@ -165,13 +162,10 @@ void test_filter_bare__from_specific_commit_with_no_attributes_file(void)
git_blob_filter_options opts = GIT_BLOB_FILTER_OPTIONS_INIT;
git_blob *blob;
git_buf buf = { 0 };
- git_oid commit_id;
-
- cl_git_pass(git_oid_fromstr(&commit_id, "5afb6a14a864e30787857dd92af837e8cdd2cb1b"));
opts.flags |= GIT_BLOB_FILTER_NO_SYSTEM_ATTRIBUTES;
opts.flags |= GIT_BLOB_FILTER_ATTRIBUTES_FROM_COMMIT;
- opts.commit_id = &commit_id;
+ cl_git_pass(git_oid_fromstr(&opts.attr_commit_id, "5afb6a14a864e30787857dd92af837e8cdd2cb1b"));
cl_git_pass(git_revparse_single(
(git_object **)&blob, g_repo, "799770d")); /* all-lf */