Commit Graph

45 Commits

Author SHA1 Message Date
Edward Thomson
6c57bac6b1 sha256: make sha256 an experimental optional feature
libgit2 can be built with optional, experimental sha256 support. This
allows consumers to begin testing and providing feedback for our sha256
support while we continue to develop it, and allows us to make API
breaking changes while we iterate on a final sha256 implementation.

The results will be `git2-experimental.dll` and installed as
`git2-experimental.h` to avoid confusion with a production libgit2.
2022-06-20 17:12:49 -04:00
Edward Thomson
36df49c26d sha: GIT_ERROR_SHA1 is deprecated in favor of GIT_ERROR_SHA
The more generic GIT_ERROR_SHA allows for SHA256 errors as well as SHA1.
2022-03-23 08:39:19 -04:00
Peter Pettersson
38c3449822 Make enum in includes C90 compliant by removing trailing comma. 2021-11-15 16:45:40 +01:00
Edward Thomson
0bd132ab82 oidarray: introduce git_oidarray_dispose
Since users are disposing the _contents_ of the oidarray, not freeing
the oidarray itself, the proper cleanup function is
`git_oidarray_dispose`.  Deprecate `git_oidarray_free`.
2021-09-26 18:02:07 -04:00
Edward Thomson
ba3595af0f diff: deprecate diff_format_email
`git_diff_format_email` is deprecated in favor of `git_email_create`.
2021-09-18 08:32:42 -04:00
Edward Thomson
969a056cc5 Merge pull request #6017 from libgit2/ethomson/buf_is_readonly
buf: deprecate public git_buf writing functions
2021-08-29 22:54:01 -04:00
Edward Thomson
d2316d5746 buf: deprecate public git_buf writing functions
A `git_buf` is now a read-only structure as far as callers are
concerned.  This is a mechanism that we can return data to callers
using memory that is owned by the library and can be cleaned up by
callers (using `git_buf_dispose`).

A `git_buf` can no longer be allocated by callers or provided to the
library.
2021-08-29 13:13:03 -04:00
Edward Thomson
ef03e15038 rebase: deprecate signing_cb
The signing callback should not be used; instead, callers should provide
a commit_create_cb, perform the signing and commit creation themselves.
2021-08-29 10:16:56 -04:00
Edward Thomson
68b9605acc filter: deprecate git_filter_list_apply_to_data
Deprecate `git_filter_list_apply_to_data` as it takes user input as a
`git_buf`.  Users should use `git_filter_list_apply_to_buffer` instead.
2021-05-06 16:31:54 +01:00
Edward Thomson
9869f1e5a3 filter: deprecate git_filter_list_stream_data
`git_filter_list_stream_data` takes user input in a `git_buf`.
`git_buf` should only be used when libgit2 itself needs to allocate data
and returned to a user that they can free when they wish.  Replace it
with `git_filter_list_stream_buffer` that takes a data buffer and
length.
2021-05-06 15:06:41 +01:00
Edward Thomson
7eb21516ad tree: deprecate git_treebuilder_write_with_buffer
The function `git_treebuilder_write_with_buffer` is unnecessary; it
is used internally as part of treebuilder writing, but it has little
use to external callers.  For callers that repeatedly write a
treebuilder, we can supply them with a buffer in the treebuilder struct
instead of recreating it.  For ourselves, when we want a single buffer
in our write loop, we can use an internal function.
2021-03-04 09:30:21 +00:00
Edward Thomson
4732e03056 revspec: rename git_revparse_mode_t to git_revspec_t
The information about the type of a revision spec is not information
about the parser.  Name it accordingly, so that `git_revparse_mode_t`
is now `git_revspec_t`.  Deprecate the old name.
2021-01-31 16:36:31 +00:00
Edward Thomson
855f2998ac blob: fix name of GIT_BLOB_FILTER_ATTRIBUTES_FROM_HEAD
`GIT_BLOB_FILTER_ATTTRIBUTES_FROM_HEAD` is misspelled, it should be
`GIT_BLOB_FILTER_ATTRIBUTES_FROM_HEAD`, and it would be if it were not
for the MacBook Pro keyboard and my inattentiveness.
2021-01-05 14:46:09 +00:00
Edward Thomson
c7143d7ce4 remote: deprecate git_remote_is_valid_name 2020-10-25 16:33:28 +00:00
Edward Thomson
63460fe4b5 refs: deprecate git_reference_is_valid_name 2020-10-25 16:33:27 +00:00
Ikko Ashimine
4b93f165cb Fixed typo in comment
occured -> occurred
2020-10-04 12:45:26 +09:00
Sven Strickroth
090e7d85ac Fix deprecation links inside of documentation not working
Signed-off-by: Sven Strickroth <email@cs-ware.de>
2020-09-10 22:41:15 +02:00
Edward Thomson
5eb48a1408 strarray: deprecate git_strarray_copy
We should not be in the business of copying strings around for users.
We either return a strarray that can be freed, or we take one (and do
not mutate it).
2020-06-01 22:50:28 +01:00
Edward Thomson
51eff5a58b strarray: we should dispose instead of free
We _dispose_ the contents of objects; we _free_ objects (and their
contents).  Update `git_strarray_free` to be `git_strarray_dispose`.
`git_strarray_free` remains as a deprecated proxy function.
2020-06-01 22:50:28 +01:00
Edward Thomson
fad840d73b credentials: provide backcompat for opaque structs
The credential structures are now opaque and defined in
`sys/credential.h`.  However, we should continue to provide them for
backward compatibility, unless `GIT_DEPRECATED_HARD` is set.
2020-03-26 12:06:07 +00:00
Edward Thomson
3f54ba8b61 credential: change git_cred to git_credential
We avoid abbreviations where possible; rename git_cred to
git_credential.

In addition, we have standardized on a trailing `_t` for enum types,
instead of using "type" in the name.  So `git_credtype_t` has become
`git_credential_t` and its members have become `GIT_CREDENTIAL` instead
of `GIT_CREDTYPE`.

Finally, the source and header files have been renamed to `credential`
instead of `cred`.

Keep previous name and values as deprecated, and include the new header
files from the previous ones.
2020-01-26 18:39:41 +00:00
Lukas Berk
5ace4ccf39 Move deprecated git_attr_t typedef to previous attribute section 2019-11-27 22:40:17 -05:00
Lukas Berk
3739a15c00 Add attr.h include 2019-11-27 21:31:25 -05:00
Lukas Berk
aea049b63a Add compat typdef for git_attr_t
Some libraries haven't updated to git_attr_value_t and break.  Adding
the comapt typedef as suggested.
2019-11-27 21:24:16 -05:00
Edward Thomson
6de48085b6 Merge pull request #5189 from libgit2/ethomson/attrs_from_head
Optionally read `.gitattributes` from HEAD
2019-08-27 11:29:24 -04:00
Edward Thomson
fa1a4c77f5 blob: deprecate git_blob_filtered_content
Users should now use `git_blob_filter`.
2019-08-11 20:47:59 +01:00
Carlos Martín Nieto
c8e249b032 object: deprecate git_object__size for removal
In #5118 we remove the double-underscore to make it a normally-named public
function. However, this is not an interesting function outside of the library
and it takes up a name for something that could be more useful.

Remove the single-underscore version as we have not done any releases with it.
2019-07-29 11:15:32 +02:00
Edward Thomson
36558513c8 configuration: deprecate git_cvar safely 2019-07-18 13:59:05 +02:00
Edward Thomson
2c64291887 net: remove unused git_headlist_cb 2019-06-16 17:56:38 +01:00
Edward Thomson
91a300b7f0 attr: rename constants and macros for consistency
Our enumeration values are not generally suffixed with `T`.  Further,
our enumeration names are generally more descriptive.
2019-06-16 13:49:03 +01:00
Patrick Steinhardt
c3bbbcf567 Merge pull request #5117 from libgit2/ethomson/to_from
Change API instances of `fromnoun` to `from_noun` (with an underscore)
2019-06-16 12:30:56 +02:00
Edward Thomson
e45350feab tag: add underscore to from function
The majority of functions are named `from_something` (with an
underscore) instead of `fromsomething`.  Update the tag function for
consistency with the rest of the library.
2019-06-16 00:55:14 +01:00
Edward Thomson
6574cd0076 index: rename frombuffer to from_buffer
The majority of functions are named `from_something` (with an
underscore) instead of `fromsomething`.  Update the index functions for
consistency with the rest of the library.
2019-06-16 00:55:14 +01:00
Edward Thomson
b7791d0426 object: rename git_object__size to git_object_size
We don't use double-underscores in the public API.
2019-06-16 00:23:01 +01:00
Edward Thomson
08f392080c blob: add underscore to from functions
The majority of functions are named `from_something` (with an
underscore) instead of `fromsomething`.  Update the blob functions for
consistency with the rest of the library.
2019-06-16 00:16:49 +01:00
Edward Thomson
5d92e54745 oid: is_zero instead of iszero
The only function that is named `issomething` (without underscore) was
`git_oid_iszero`.  Rename it to `git_oid_is_zero` for consistency with
the rest of the library.
2019-06-16 00:16:47 +01:00
Edward Thomson
0b5ba0d744 Rename opt init functions to options_init
In libgit2 nomenclature, when we need to verb a direct object, we name
a function `git_directobject_verb`.  Thus, if we need to init an options
structure named `git_foo_options`, then the name of the function that
does that should be `git_foo_options_init`.

The previous names of `git_foo_init_options` is close - it _sounds_ as
if it's initializing the options of a `foo`, but in fact
`git_foo_options` is its own noun that should be respected.

Deprecate the old names; they'll now call directly to the new ones.
2019-06-14 09:57:00 +01:00
Edward Thomson
178df697e3 trace: suffix the callbacks with _cb
The trace logging callbacks should match the other callback naming
conventions, using the `_cb` suffix instead of a `_callback` suffix.
2019-06-10 11:37:00 +01:00
Edward Thomson
810cefd93f credentials: suffix the callbacks with _cb
The credential callbacks should match the other callback naming
conventions, using the `_cb` suffix instead of a `_callback` suffix.
2019-06-10 11:37:00 +01:00
Edward Thomson
2dd5a42941 remote: Rename git_remote_completion_type to _t
For consistency with other "type" enums, rename
git_remote_completion_type to git_remote_completion_t.
2019-02-25 13:17:58 +00:00
Edward Thomson
ca909da5dd remote: deprecate git_push_transfer_progress
Safely deprecate `git_push_transfer_progress`, forwarding it to the new
`git_push_transfer_progress_cb` name.
2019-02-22 11:26:51 +00:00
Edward Thomson
7506d34c0c indexer: deprecate git_transfer_progress
Safely deprecate `git_transfer_progress` and `git_transfer_progress_cb`
types, forwarding them to the new `git_indexer_progress` and
`git_indexer_progress_cb`.
2019-02-22 11:25:14 +00:00
Edward Thomson
9f3a5a64b5 deprecation: offer GIT_DEPRECATE_HARD
Users can define `GIT_DEPRECATE_HARD` if they want to remove all
functions that we've "softly" deprecated.
2019-01-25 09:06:50 +00:00
Edward Thomson
09e2ea2fe1 deprecation: provide docurium deprecation note
Add `@deprecated` to the functions that are, so that they'll appear that
way in docurium.
2019-01-25 09:06:50 +00:00
Edward Thomson
a7d0d14fb0 deprecation: move deprecated bits to deprecated.h 2019-01-25 09:06:50 +00:00