diff options
-rw-r--r-- | src/blame.c | 2 | ||||
-rw-r--r-- | src/blob.c | 2 | ||||
-rw-r--r-- | src/buffer.c | 2 | ||||
-rw-r--r-- | src/checkout.c | 2 | ||||
-rw-r--r-- | src/cherrypick.c | 2 | ||||
-rw-r--r-- | src/clone.c | 2 | ||||
-rw-r--r-- | src/describe.c | 4 | ||||
-rw-r--r-- | src/diff.c | 6 | ||||
-rw-r--r-- | src/errors.c | 2 | ||||
-rw-r--r-- | src/fetch.c | 2 | ||||
-rw-r--r-- | src/index.c | 2 | ||||
-rw-r--r-- | src/indexer.c | 2 | ||||
-rw-r--r-- | src/merge.c | 6 | ||||
-rw-r--r-- | src/odb.c | 2 | ||||
-rw-r--r-- | src/oid.c | 2 | ||||
-rw-r--r-- | src/proxy.c | 2 | ||||
-rw-r--r-- | src/push.c | 2 | ||||
-rw-r--r-- | src/rebase.c | 2 | ||||
-rw-r--r-- | src/remote.c | 2 | ||||
-rw-r--r-- | src/repository.c | 2 | ||||
-rw-r--r-- | src/revert.c | 2 | ||||
-rw-r--r-- | src/stash.c | 2 | ||||
-rw-r--r-- | src/status.c | 2 | ||||
-rw-r--r-- | src/strarray.c | 2 | ||||
-rw-r--r-- | src/streams/registry.c | 3 | ||||
-rw-r--r-- | src/submodule.c | 2 | ||||
-rw-r--r-- | src/tag.c | 2 | ||||
-rw-r--r-- | src/transports/credential.c | 2 | ||||
-rw-r--r-- | src/transports/credential_helpers.c | 2 | ||||
-rw-r--r-- | src/worktree.c | 4 | ||||
-rw-r--r-- | tests/stream/deprecated.c | 12 |
31 files changed, 79 insertions, 6 deletions
diff --git a/src/blame.c b/src/blame.c index 23c21027a..1046dab55 100644 --- a/src/blame.c +++ b/src/blame.c @@ -538,7 +538,9 @@ int git_blame_options_init(git_blame_options *opts, unsigned int version) return 0; } +#ifndef GIT_DEPRECATE_HARD int git_blame_init_options(git_blame_options *opts, unsigned int version) { return git_blame_options_init(opts, version); } +#endif diff --git a/src/blob.c b/src/blob.c index 5e734e2c1..da4e6ffa5 100644 --- a/src/blob.c +++ b/src/blob.c @@ -445,6 +445,7 @@ int git_blob_filter( /* Deprecated functions */ +#ifndef GIT_DEPRECATE_HARD int git_blob_create_frombuffer( git_oid *id, git_repository *repo, const void *buffer, size_t len) { @@ -491,3 +492,4 @@ int git_blob_filtered_content( return git_blob_filter(out, blob, path, &opts); } +#endif diff --git a/src/buffer.c b/src/buffer.c index 328fdfe7f..3ee2775b1 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -133,10 +133,12 @@ void git_buf_dispose(git_buf *buf) git_buf_init(buf, 0); } +#ifndef GIT_DEPRECATE_HARD void git_buf_free(git_buf *buf) { git_buf_dispose(buf); } +#endif void git_buf_sanitize(git_buf *buf) { diff --git a/src/checkout.c b/src/checkout.c index 44a867153..b18e8d9e9 100644 --- a/src/checkout.c +++ b/src/checkout.c @@ -2820,7 +2820,9 @@ int git_checkout_options_init(git_checkout_options *opts, unsigned int version) return 0; } +#ifndef GIT_DEPRECATE_HARD int git_checkout_init_options(git_checkout_options *opts, unsigned int version) { return git_checkout_options_init(opts, version); } +#endif diff --git a/src/cherrypick.c b/src/cherrypick.c index 640d11a7b..103897aae 100644 --- a/src/cherrypick.c +++ b/src/cherrypick.c @@ -229,8 +229,10 @@ int git_cherrypick_options_init( return 0; } +#ifndef GIT_DEPRECATE_HARD int git_cherrypick_init_options( git_cherrypick_options *opts, unsigned int version) { return git_cherrypick_options_init(opts, version); } +#endif diff --git a/src/clone.c b/src/clone.c index 3d749c32f..8ca6cea1d 100644 --- a/src/clone.c +++ b/src/clone.c @@ -479,10 +479,12 @@ int git_clone_options_init(git_clone_options *opts, unsigned int version) return 0; } +#ifndef GIT_DEPRECATE_HARD int git_clone_init_options(git_clone_options *opts, unsigned int version) { return git_clone_options_init(opts, version); } +#endif static bool can_link(const char *src, const char *dst, int link) { diff --git a/src/describe.c b/src/describe.c index 42e5848c2..c8a175214 100644 --- a/src/describe.c +++ b/src/describe.c @@ -876,10 +876,12 @@ int git_describe_options_init(git_describe_options *opts, unsigned int version) return 0; } +#ifndef GIT_DEPRECATE_HARD int git_describe_init_options(git_describe_options *opts, unsigned int version) { return git_describe_options_init(opts, version); } +#endif int git_describe_format_options_init(git_describe_format_options *opts, unsigned int version) { @@ -888,7 +890,9 @@ int git_describe_format_options_init(git_describe_format_options *opts, unsigned return 0; } +#ifndef GIT_DEPRECATE_HARD int git_describe_init_format_options(git_describe_format_options *opts, unsigned int version) { return git_describe_format_options_init(opts, version); } +#endif diff --git a/src/diff.c b/src/diff.c index 9fd361343..3e52e3f18 100644 --- a/src/diff.c +++ b/src/diff.c @@ -352,10 +352,12 @@ int git_diff_options_init(git_diff_options *opts, unsigned int version) return 0; } +#ifndef GIT_DEPRECATE_HARD int git_diff_init_options(git_diff_options *opts, unsigned int version) { return git_diff_options_init(opts, version); } +#endif int git_diff_find_options_init( git_diff_find_options *opts, unsigned int version) @@ -365,11 +367,13 @@ int git_diff_find_options_init( return 0; } +#ifndef GIT_DEPRECATE_HARD int git_diff_find_init_options( git_diff_find_options *opts, unsigned int version) { return git_diff_find_options_init(opts, version); } +#endif int git_diff_format_email_options_init( git_diff_format_email_options *opts, unsigned int version) @@ -380,11 +384,13 @@ int git_diff_format_email_options_init( return 0; } +#ifndef GIT_DEPRECATE_HARD int git_diff_format_email_init_options( git_diff_format_email_options *opts, unsigned int version) { return git_diff_format_email_options_init(opts, version); } +#endif static int flush_hunk(git_oid *result, git_hash_ctx *ctx) { diff --git a/src/errors.c b/src/errors.c index b34aa3abb..8570226b4 100644 --- a/src/errors.c +++ b/src/errors.c @@ -210,6 +210,7 @@ void git_error_system_set(int code) /* Deprecated error values and functions */ +#ifndef GIT_DEPRECATE_HARD const git_error *giterr_last(void) { return git_error_last(); @@ -229,3 +230,4 @@ void giterr_set_oom(void) { git_error_set_oom(); } +#endif diff --git a/src/fetch.c b/src/fetch.c index f2f313192..f4a4c9f81 100644 --- a/src/fetch.c +++ b/src/fetch.c @@ -155,7 +155,9 @@ int git_fetch_options_init(git_fetch_options *opts, unsigned int version) return 0; } +#ifndef GIT_DEPRECATE_HARD int git_fetch_init_options(git_fetch_options *opts, unsigned int version) { return git_fetch_options_init(opts, version); } +#endif diff --git a/src/index.c b/src/index.c index 774321d90..361288b8d 100644 --- a/src/index.c +++ b/src/index.c @@ -3717,9 +3717,11 @@ void git_indexwriter_cleanup(git_indexwriter *writer) /* Deprecated functions */ +#ifndef GIT_DEPRECATE_HARD int git_index_add_frombuffer( git_index *index, const git_index_entry *source_entry, const void *buffer, size_t len) { return git_index_add_from_buffer(index, source_entry, buffer, len); } +#endif diff --git a/src/indexer.c b/src/indexer.c index 8dc6c7a7f..412dfc92d 100644 --- a/src/indexer.c +++ b/src/indexer.c @@ -123,10 +123,12 @@ int git_indexer_options_init(git_indexer_options *opts, unsigned int version) return 0; } +#ifndef GIT_DEPRECATE_HARD int git_indexer_init_options(git_indexer_options *opts, unsigned int version) { return git_indexer_options_init(opts, version); } +#endif int git_indexer_new( git_indexer **out, diff --git a/src/merge.c b/src/merge.c index 652b7ea6e..2f6bf6fe7 100644 --- a/src/merge.c +++ b/src/merge.c @@ -3351,10 +3351,12 @@ int git_merge_options_init(git_merge_options *opts, unsigned int version) return 0; } +#ifndef GIT_DEPRECATE_HARD int git_merge_init_options(git_merge_options *opts, unsigned int version) { return git_merge_options_init(opts, version); } +#endif int git_merge_file_input_init(git_merge_file_input *input, unsigned int version) { @@ -3363,10 +3365,12 @@ int git_merge_file_input_init(git_merge_file_input *input, unsigned int version) return 0; } +#ifndef GIT_DEPRECATE_HARD int git_merge_file_init_input(git_merge_file_input *input, unsigned int version) { return git_merge_file_input_init(input, version); } +#endif int git_merge_file_options_init( git_merge_file_options *opts, unsigned int version) @@ -3376,8 +3380,10 @@ int git_merge_file_options_init( return 0; } +#ifndef GIT_DEPRECATE_HARD int git_merge_file_init_options( git_merge_file_options *opts, unsigned int version) { return git_merge_file_options_init(opts, version); } +#endif @@ -1510,10 +1510,12 @@ void *git_odb_backend_data_alloc(git_odb_backend *backend, size_t len) return git__malloc(len); } +#ifndef GIT_DEPRECATE_HARD void *git_odb_backend_malloc(git_odb_backend *backend, size_t len) { return git_odb_backend_data_alloc(backend, len); } +#endif void git_odb_backend_data_free(git_odb_backend *backend, void *data) { @@ -253,10 +253,12 @@ int git_oid_is_zero(const git_oid *oid_a) return 1; } +#ifndef GIT_DEPRECATE_HARD int git_oid_iszero(const git_oid *oid_a) { return git_oid_is_zero(oid_a); } +#endif typedef short node_index; diff --git a/src/proxy.c b/src/proxy.c index 367c4b1f7..78a4c5535 100644 --- a/src/proxy.c +++ b/src/proxy.c @@ -16,10 +16,12 @@ int git_proxy_options_init(git_proxy_options *opts, unsigned int version) return 0; } +#ifndef GIT_DEPRECATE_HARD int git_proxy_init_options(git_proxy_options *opts, unsigned int version) { return git_proxy_options_init(opts, version); } +#endif int git_proxy_options_dup(git_proxy_options *tgt, const git_proxy_options *src) { diff --git a/src/push.c b/src/push.c index 34867c2e4..b724188f9 100644 --- a/src/push.c +++ b/src/push.c @@ -555,7 +555,9 @@ int git_push_options_init(git_push_options *opts, unsigned int version) return 0; } +#ifndef GIT_DEPRECATE_HARD int git_push_init_options(git_push_options *opts, unsigned int version) { return git_push_options_init(opts, version); } +#endif diff --git a/src/rebase.c b/src/rebase.c index 0a38807a7..7c6561195 100644 --- a/src/rebase.c +++ b/src/rebase.c @@ -501,10 +501,12 @@ int git_rebase_options_init(git_rebase_options *opts, unsigned int version) return 0; } +#ifndef GIT_DEPRECATE_HARD int git_rebase_init_options(git_rebase_options *opts, unsigned int version) { return git_rebase_options_init(opts, version); } +#endif static int rebase_ensure_not_in_progress(git_repository *repo) { diff --git a/src/remote.c b/src/remote.c index 78e056a9d..23054c83b 100644 --- a/src/remote.c +++ b/src/remote.c @@ -195,10 +195,12 @@ int git_remote_create_options_init(git_remote_create_options *opts, unsigned int return 0; } +#ifndef GIT_DEPRECATE_HARD int git_remote_create_init_options(git_remote_create_options *opts, unsigned int version) { return git_remote_create_options_init(opts, version); } +#endif int git_remote_create_with_opts(git_remote **out, const char *url, const git_remote_create_options *opts) { diff --git a/src/repository.c b/src/repository.c index 580615577..5e818fb82 100644 --- a/src/repository.c +++ b/src/repository.c @@ -2928,11 +2928,13 @@ int git_repository_init_options_init( return 0; } +#ifndef GIT_DEPRECATE_HARD int git_repository_init_init_options( git_repository_init_options *opts, unsigned int version) { return git_repository_init_options_init(opts, version); } +#endif int git_repository_ident(const char **name, const char **email, const git_repository *repo) { diff --git a/src/revert.c b/src/revert.c index b41a2a131..b84bc7d79 100644 --- a/src/revert.c +++ b/src/revert.c @@ -231,7 +231,9 @@ int git_revert_options_init(git_revert_options *opts, unsigned int version) return 0; } +#ifndef GIT_DEPRECATE_HARD int git_revert_init_options(git_revert_options *opts, unsigned int version) { return git_revert_options_init(opts, version); } +#endif diff --git a/src/stash.c b/src/stash.c index 790f56fdd..0d5dc4351 100644 --- a/src/stash.c +++ b/src/stash.c @@ -776,10 +776,12 @@ int git_stash_apply_options_init(git_stash_apply_options *opts, unsigned int ver return 0; } +#ifndef GIT_DEPRECATE_HARD int git_stash_apply_init_options(git_stash_apply_options *opts, unsigned int version) { return git_stash_apply_options_init(opts, version); } +#endif #define NOTIFY_PROGRESS(opts, progress_type) \ do { \ diff --git a/src/status.c b/src/status.c index 6a1284415..eca1f4912 100644 --- a/src/status.c +++ b/src/status.c @@ -548,10 +548,12 @@ int git_status_options_init(git_status_options *opts, unsigned int version) return 0; } +#ifndef GIT_DEPRECATE_HARD int git_status_init_options(git_status_options *opts, unsigned int version) { return git_status_options_init(opts, version); } +#endif int git_status_list_get_perfdata( git_diff_perfdata *out, const git_status_list *status) diff --git a/src/strarray.c b/src/strarray.c index 7ad413404..54fe9fbfb 100644 --- a/src/strarray.c +++ b/src/strarray.c @@ -55,7 +55,9 @@ void git_strarray_dispose(git_strarray *array) memset(array, 0, sizeof(*array)); } +#ifndef GIT_DEPRECATE_HARD void git_strarray_free(git_strarray *array) { git_strarray_dispose(array); } +#endif diff --git a/src/streams/registry.c b/src/streams/registry.c index a5fa84931..284431207 100644 --- a/src/streams/registry.c +++ b/src/streams/registry.c @@ -101,7 +101,7 @@ int git_stream_register(git_stream_t type, git_stream_registration *registration return 0; } - +#ifndef GIT_DEPRECATE_HARD int git_stream_register_tls( int GIT_CALLBACK(ctor)(git_stream **out, const char *host, const char *port)) { @@ -117,3 +117,4 @@ int git_stream_register_tls( return git_stream_register(GIT_STREAM_TLS, NULL); } } +#endif diff --git a/src/submodule.c b/src/submodule.c index 7ae78c181..c32b9770a 100644 --- a/src/submodule.c +++ b/src/submodule.c @@ -1240,10 +1240,12 @@ int git_submodule_update_options_init(git_submodule_update_options *opts, unsign return 0; } +#ifndef GIT_DEPRECATE_HARD int git_submodule_update_init_options(git_submodule_update_options *opts, unsigned int version) { return git_submodule_update_options_init(opts, version); } +#endif int git_submodule_update(git_submodule *sm, int init, git_submodule_update_options *_update_options) { @@ -524,7 +524,9 @@ int git_tag_peel(git_object **tag_target, const git_tag *tag) /* Deprecated Functions */ +#ifndef GIT_DEPRECATE_HARD int git_tag_create_frombuffer(git_oid *oid, git_repository *repo, const char *buffer, int allow_ref_overwrite) { return git_tag_create_from_buffer(oid, repo, buffer, allow_ref_overwrite); } +#endif diff --git a/src/transports/credential.c b/src/transports/credential.c index 0cf50a029..7b2836445 100644 --- a/src/transports/credential.c +++ b/src/transports/credential.c @@ -391,6 +391,7 @@ void git_credential_free(git_credential *cred) /* Deprecated credential functions */ +#ifndef GIT_DEPRECATE_HARD int git_cred_has_username(git_credential *cred) { return git_credential_has_username(cred); @@ -474,3 +475,4 @@ void git_cred_free(git_credential *cred) { git_credential_free(cred); } +#endif diff --git a/src/transports/credential_helpers.c b/src/transports/credential_helpers.c index 6b975e126..6d34a4e97 100644 --- a/src/transports/credential_helpers.c +++ b/src/transports/credential_helpers.c @@ -54,6 +54,7 @@ int git_credential_userpass( /* Deprecated credential functions */ +#ifndef GIT_DEPRECATE_HARD int git_cred_userpass( git_credential **out, const char *url, @@ -64,3 +65,4 @@ int git_cred_userpass( return git_credential_userpass(out, url, user_from_url, allowed_types, payload); } +#endif diff --git a/src/worktree.c b/src/worktree.c index 74b32f97c..fda9b0b71 100644 --- a/src/worktree.c +++ b/src/worktree.c @@ -271,11 +271,13 @@ int git_worktree_add_options_init(git_worktree_add_options *opts, return 0; } +#ifndef GIT_DEPRECATE_HARD int git_worktree_add_init_options(git_worktree_add_options *opts, unsigned int version) { return git_worktree_add_options_init(opts, version); } +#endif int git_worktree_add(git_worktree **out, git_repository *repo, const char *name, const char *worktree, @@ -506,11 +508,13 @@ int git_worktree_prune_options_init( return 0; } +#ifndef GIT_DEPRECATE_HARD int git_worktree_prune_init_options(git_worktree_prune_options *opts, unsigned int version) { return git_worktree_prune_options_init(opts, version); } +#endif int git_worktree_is_prunable(git_worktree *wt, git_worktree_prune_options *opts) diff --git a/tests/stream/deprecated.c b/tests/stream/deprecated.c index 2c2bbfdc3..fecd1be03 100644 --- a/tests/stream/deprecated.c +++ b/tests/stream/deprecated.c @@ -1,19 +1,18 @@ -#undef GIT_DEPRECATE_HARD - #include "clar_libgit2.h" #include "git2/sys/stream.h" #include "streams/tls.h" #include "streams/socket.h" #include "stream.h" -static git_stream test_stream; -static int ctor_called; - void test_stream_deprecated__cleanup(void) { cl_git_pass(git_stream_register(GIT_STREAM_TLS | GIT_STREAM_STANDARD, NULL)); } +#ifndef GIT_DEPRECATE_HARD +static git_stream test_stream; +static int ctor_called; + static int test_stream_init(git_stream **out, const char *host, const char *port) { GIT_UNUSED(host); @@ -24,9 +23,11 @@ static int test_stream_init(git_stream **out, const char *host, const char *port return 0; } +#endif void test_stream_deprecated__register_tls(void) { +#ifndef GIT_DEPRECATE_HARD git_stream *stream; int error; @@ -55,4 +56,5 @@ void test_stream_deprecated__register_tls(void) cl_assert(&test_stream != stream); git_stream_free(stream); +#endif } |