diff options
| author | Patrick Steinhardt <ps@pks.im> | 2019-06-16 12:30:56 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-06-16 12:30:56 +0200 |
| commit | c3bbbcf5670657ff567e2eb5e8e62e53343bf36f (patch) | |
| tree | 3b8071299a3d86c1abdb3925e91c6d7d2590556b /include/git2 | |
| parent | 2bdb617a48ee72446355ed6a8c4680510ec740dd (diff) | |
| parent | e45350feab198e2e29559f7e30331e81ca4cba86 (diff) | |
| download | libgit2-c3bbbcf5670657ff567e2eb5e8e62e53343bf36f.tar.gz | |
Merge pull request #5117 from libgit2/ethomson/to_from
Change API instances of `fromnoun` to `from_noun` (with an underscore)
Diffstat (limited to 'include/git2')
| -rw-r--r-- | include/git2/blob.h | 14 | ||||
| -rw-r--r-- | include/git2/deprecated.h | 57 | ||||
| -rw-r--r-- | include/git2/index.h | 2 | ||||
| -rw-r--r-- | include/git2/oid.h | 2 | ||||
| -rw-r--r-- | include/git2/tag.h | 2 |
5 files changed, 63 insertions, 14 deletions
diff --git a/include/git2/blob.h b/include/git2/blob.h index ff1a4818f..072522d5c 100644 --- a/include/git2/blob.h +++ b/include/git2/blob.h @@ -136,7 +136,7 @@ GIT_EXTERN(int) git_blob_filtered_content( * relative to the repository's working dir * @return 0 or an error code */ -GIT_EXTERN(int) git_blob_create_fromworkdir(git_oid *id, git_repository *repo, const char *relative_path); +GIT_EXTERN(int) git_blob_create_from_workdir(git_oid *id, git_repository *repo, const char *relative_path); /** * Read a file from the filesystem and write its content @@ -148,7 +148,7 @@ GIT_EXTERN(int) git_blob_create_fromworkdir(git_oid *id, git_repository *repo, c * @param path file from which the blob will be created * @return 0 or an error code */ -GIT_EXTERN(int) git_blob_create_fromdisk(git_oid *id, git_repository *repo, const char *path); +GIT_EXTERN(int) git_blob_create_from_disk(git_oid *id, git_repository *repo, const char *path); /** * Create a stream to write a new blob into the object db @@ -156,12 +156,12 @@ GIT_EXTERN(int) git_blob_create_fromdisk(git_oid *id, git_repository *repo, cons * This function may need to buffer the data on disk and will in * general not be the right choice if you know the size of the data * to write. If you have data in memory, use - * `git_blob_create_frombuffer()`. If you do not, but know the size of + * `git_blob_create_from_buffer()`. If you do not, but know the size of * the contents (and don't want/need to perform filtering), use * `git_odb_open_wstream()`. * * Don't close this stream yourself but pass it to - * `git_blob_create_fromstream_commit()` to commit the write to the + * `git_blob_create_from_stream_commit()` to commit the write to the * object db and get the object id. * * If the `hintpath` parameter is filled, it will be used to determine @@ -175,7 +175,7 @@ GIT_EXTERN(int) git_blob_create_fromdisk(git_oid *id, git_repository *repo, cons * to apply onto the content of the blob to be created. * @return 0 or error code */ -GIT_EXTERN(int) git_blob_create_fromstream( +GIT_EXTERN(int) git_blob_create_from_stream( git_writestream **out, git_repository *repo, const char *hintpath); @@ -189,7 +189,7 @@ GIT_EXTERN(int) git_blob_create_fromstream( * @param stream the stream to close * @return 0 or an error code */ -GIT_EXTERN(int) git_blob_create_fromstream_commit( +GIT_EXTERN(int) git_blob_create_from_stream_commit( git_oid *out, git_writestream *stream); @@ -202,7 +202,7 @@ GIT_EXTERN(int) git_blob_create_fromstream_commit( * @param len length of the data * @return 0 or an error code */ -GIT_EXTERN(int) git_blob_create_frombuffer( +GIT_EXTERN(int) git_blob_create_from_buffer( git_oid *id, git_repository *repo, const void *buffer, size_t len); /** diff --git a/include/git2/deprecated.h b/include/git2/deprecated.h index 0195917bb..d769dff3f 100644 --- a/include/git2/deprecated.h +++ b/include/git2/deprecated.h @@ -45,6 +45,30 @@ */ GIT_BEGIN_DECL +/** @name Deprecated Blob Functions + * + * These functions are retained for backward compatibility. The newer + * versions of these functions should be preferred in all new code. + * + * There is no plan to remove these backward compatibility values at + * this time. + */ +/**@{*/ + +GIT_EXTERN(int) git_blob_create_fromworkdir(git_oid *id, git_repository *repo, const char *relative_path); +GIT_EXTERN(int) git_blob_create_fromdisk(git_oid *id, git_repository *repo, const char *path); +GIT_EXTERN(int) git_blob_create_fromstream( + git_writestream **out, + git_repository *repo, + const char *hintpath); +GIT_EXTERN(int) git_blob_create_fromstream_commit( + git_oid *out, + git_writestream *stream); +GIT_EXTERN(int) git_blob_create_frombuffer( + git_oid *id, git_repository *repo, const void *buffer, size_t len); + +/**@}*/ + /** @name Deprecated Buffer Functions * * These functions and enumeration values are retained for backward @@ -167,10 +191,11 @@ GIT_EXTERN(void) giterr_set_oom(void); /**@}*/ -/** @name Deprecated Index Constants +/** @name Deprecated Index Functions and Constants * - * These enumeration values are retained for backward compatibility. - * The newer versions of these values should be preferred in all new code. + * These functions and enumeration values are retained for backward + * compatibility. The newer versions of these values should be + * preferred in all new code. * * There is no plan to remove these backward compatibility values at * this time. @@ -210,6 +235,11 @@ GIT_EXTERN(void) giterr_set_oom(void); #define GIT_INDEXCAP_NO_SYMLINKS GIT_INDEX_CAPABILITY_NO_SYMLINKS #define GIT_INDEXCAP_FROM_OWNER GIT_INDEX_CAPABILITY_FROM_OWNER +GIT_EXTERN(int) git_index_add_frombuffer( + git_index *index, + const git_index_entry *entry, + const void *buffer, size_t len); + /**@}*/ /** @name Deprecated Object Constants @@ -263,6 +293,12 @@ GIT_EXTERN(size_t) git_object__size(git_object_t type); #define GIT_REF_FORMAT_REFSPEC_PATTERN GIT_REFERENCE_FORMAT_REFSPEC_PATTERN #define GIT_REF_FORMAT_REFSPEC_SHORTHAND GIT_REFERENCE_FORMAT_REFSPEC_SHORTHAND +GIT_EXTERN(int) git_tag_create_frombuffer( + git_oid *oid, + git_repository *repo, + const char *buffer, + int force); + /**@}*/ /** @name Deprecated Credential Callback Types @@ -273,7 +309,6 @@ GIT_EXTERN(size_t) git_object__size(git_object_t type); * There is no plan to remove these backward compatibility values at * this time. */ -/**@{*/ typedef git_cred_sign_cb git_cred_sign_callback; typedef git_cred_ssh_interactive_cb git_cred_ssh_interactive_callback; @@ -294,6 +329,20 @@ typedef git_trace_cb git_trace_callback; /**@}*/ +/** @name Deprecated Object ID Types + * + * These types are retained for backward compatibility. The newer + * versions of these values should be preferred in all new code. + * + * There is no plan to remove these backward compatibility values at + * this time. + */ +/**@{*/ + +GIT_EXTERN(int) git_oid_iszero(const git_oid *id); + +/**@}*/ + /** @name Deprecated Transfer Progress Types * * These types are retained for backward compatibility. The newer diff --git a/include/git2/index.h b/include/git2/index.h index fce361600..8723aa636 100644 --- a/include/git2/index.h +++ b/include/git2/index.h @@ -572,7 +572,7 @@ GIT_EXTERN(int) git_index_add_bypath(git_index *index, const char *path); * @param len length of the data * @return 0 or an error code */ -GIT_EXTERN(int) git_index_add_frombuffer( +GIT_EXTERN(int) git_index_add_from_buffer( git_index *index, const git_index_entry *entry, const void *buffer, size_t len); diff --git a/include/git2/oid.h b/include/git2/oid.h index 7e071bac7..8f27c1365 100644 --- a/include/git2/oid.h +++ b/include/git2/oid.h @@ -207,7 +207,7 @@ GIT_EXTERN(int) git_oid_strcmp(const git_oid *id, const char *str); * * @return 1 if all zeros, 0 otherwise. */ -GIT_EXTERN(int) git_oid_iszero(const git_oid *id); +GIT_EXTERN(int) git_oid_is_zero(const git_oid *id); /** * OID Shortener object diff --git a/include/git2/tag.h b/include/git2/tag.h index c2d490d26..4e5fe1db1 100644 --- a/include/git2/tag.h +++ b/include/git2/tag.h @@ -217,7 +217,7 @@ GIT_EXTERN(int) git_tag_annotation_create( * @param force Overwrite existing tags * @return 0 on success; error code otherwise */ -GIT_EXTERN(int) git_tag_create_frombuffer( +GIT_EXTERN(int) git_tag_create_from_buffer( git_oid *oid, git_repository *repo, const char *buffer, |
