summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2021-09-21 11:52:05 -0400
committerGitHub <noreply@github.com>2021-09-21 11:52:05 -0400
commit5ea2966d01624912538545b55061c725b189fef9 (patch)
tree66d08843ebb420e242456e30266616dbae87c1e0
parentba01547d4a8190d5e4df317d4b0d0767e160bc57 (diff)
parent470acc718888782646347ae6e450bc167144acfd (diff)
downloadlibgit2-5ea2966d01624912538545b55061c725b189fef9.tar.gz
Merge pull request #6066 from libgit2/ethomson/deprecation
Fixes for deprecated APIs
-rw-r--r--src/email.c1
-rw-r--r--tests/rebase/sign.c14
2 files changed, 7 insertions, 8 deletions
diff --git a/src/email.c b/src/email.c
index 8957d9a38..df63b6ec3 100644
--- a/src/email.c
+++ b/src/email.c
@@ -217,7 +217,6 @@ int git_email__append_from_diff(
memcpy(&opts, given_opts, sizeof(git_email_create_options));
git_buf_sanitize(out);
- git_buf_clear(out);
if ((error = append_header(out, patch_idx, patch_count, commit_id, summary, author, &opts)) == 0 &&
(error = append_body(out, body)) == 0 &&
diff --git a/tests/rebase/sign.c b/tests/rebase/sign.c
index 8b0473c3c..06c18937a 100644
--- a/tests/rebase/sign.c
+++ b/tests/rebase/sign.c
@@ -249,13 +249,7 @@ void test_rebase_sign__create_propagates_error(void)
}
#ifndef GIT_DEPRECATE_HARD
-int signing_cb_passthrough(
- git_buf *signature,
- git_buf *signature_field,
- const char *commit_content,
- void *payload)
-{
- static const char *expected_commit_content = "\
+static const char *expected_commit_content = "\
tree cd99b26250099fc38d30bfaed7797a7275ed3366\n\
parent f87d14a4a236582a0278a916340a793714256864\n\
author Edward Thomson <ethomson@edwardthomson.com> 1405625055 -0400\n\
@@ -263,6 +257,12 @@ committer Rebaser <rebaser@rebaser.rb> 1405694510 +0000\n\
\n\
Modification 3 to gravy\n";
+int signing_cb_passthrough(
+ git_buf *signature,
+ git_buf *signature_field,
+ const char *commit_content,
+ void *payload)
+{
cl_assert_equal_b(false, git_buf_is_allocated(signature));
cl_assert_equal_b(false, git_buf_is_allocated(signature_field));
cl_assert_equal_s(expected_commit_content, commit_content);