Commit Graph

82 Commits

Author SHA1 Message Date
Edward Thomson
df57b2eade warning: allow callers to configure a warning callback 2025-02-26 17:24:26 +01:00
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
75d4676a64 email: introduce git_email_create_from_commit
Create `git_email_*` which will encapsulate email creation and
application, and `git_email_create_from_commit` in particular, which
creates an email for a single commit.
2021-09-18 08:32:41 -04: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
Etienne Samson
606f6e21a9 cert: move cert enums & struct to its own header 2019-09-13 16:54:40 +02:00
Etienne Samson
8bf0f7eb26 cred: separate public interface from low-level details 2019-09-13 16:54:40 +02:00
Edward Thomson
a7d0d14fb0 deprecation: move deprecated bits to deprecated.h 2019-01-25 09:06:50 +00:00
Edward Thomson
02b1083ab7 apply: introduce git_apply_tree
Introduce `git_apply_tree`, which will apply a `git_diff` to a given
`git_tree`, allowing an in-memory patch application for a repository.
2018-11-03 16:44:26 +00:00
Emilio Cobos Álvarez
7a169390b8 mailmap: WIP mailmap support 2018-06-14 22:43:26 -07:00
apnadkarni
d439fb20bc Include git2/worktree.h in git2.h
I'm not sure if worktree.h was intentionally left out of git2.h. Looks like an oversight since it is in fact documented.
2017-11-25 15:48:03 +05:30
Carlos Martín Nieto
a7bece2014 proxy: introduce a proxy options struct
It is currently unused; it will go into the remote's options.
2016-04-19 13:54:19 +02:00
Carlos Martín Nieto
be5fda7587 Include git2/transaction.h
This was forgotten when the feature was implemented.
2015-05-31 19:22:12 +02:00
Carlos Martín Nieto
8f0104ecc5 Remove the callbacks struct from the remote
Having the setting be different from calling its actions was not a great
idea and made for the sake of the wrong convenience.

Instead of that, accept either fetch options, push options or the
callbacks when dealing with the remote. The fetch options are currently
only the callbacks, but more options will be moved from setters and
getters on the remote to the options.

This does mean passing the same struct along the different functions but
the typical use-case will only call git_remote_fetch() or
git_remote_push() and so won't notice much difference.
2015-05-13 09:46:35 +02:00
Carlos Martín Nieto
263b1d6ed9 Make the OpenSSL locking function warnings more severe
Our git_openssl_set_locking() would ideally not exist. Make it clearer
that we provide it as a last resort and you should prefer anything else.
2014-12-12 15:46:57 +01:00
Pierre-Olivier Latour
889d8c8b8f Fixed git2.h not including threads.h anymore 2014-11-15 08:20:36 +09:00
Carlos Martín Nieto
799e22ea0c Rename git_threads_ to git_libgit2_
This describes their purpose better, as we now initialize ssl and some
other global stuff in there. Calling the init function is not something
which has been optional for a while now.
2014-11-08 23:46:39 +01:00
Edward Thomson
979645a719 rebase: updates based on PR comments 2014-10-26 22:59:50 -04:00
Edward Thomson
18b00406c6 s/git_merge_head/git_annotated_commit
Rename git_merge_head to git_annotated_commit, as it becomes used
in more operations than just merge.
2014-10-26 22:59:48 -04:00
Carlos Martín Nieto
46a2b8e855 Merge pull request #2592 from libgit2/cmn/describe
Implement git-describe
2014-10-09 22:24:40 +02:00
Carlos Martín Nieto
5451754d46 Include git2/odb_backend.h in git2.h
Since this isn't under sys/ we need to have it included in the main
git2.h file.

This fixes #2551.
2014-09-30 16:27:53 +02:00
nulltoken
3a728fb508 object: introduce git_describe_object() 2014-04-30 09:46:25 +02:00
Jacques Germishuys
4d7b993904 Added cherry-pick support 2014-04-14 16:16:21 +02:00
Linquize
d706e843e1 Include git2/revert.h in git2.h 2013-12-03 23:00:50 +08:00
Ben Straub
42c8f8f807 Merge remote-tracking branch 'libgit2/development' into blame 2013-10-28 11:04:58 -07:00
Russell Belfer
3ff1d12373 Rename diff objects and split patch.h
This makes no functional change to diff but renames a couple of
the objects and splits the new git_patch (formerly git_diff_patch)
into a new header file.
2013-10-11 14:51:54 -07:00
Ben Straub
fc1f7d4f15 Merge branch 'development' into blame
Conflicts:
	include/git2.h
2013-10-03 06:20:20 -07:00
Edward Thomson
7d69245415 Add refdb.h to git2.h, reorder git2.h sanely 2013-09-27 16:08:24 -04:00
Ben Straub
41dd999d12 Merge branch 'development' into blame 2013-09-25 14:47:32 -07:00
Russell Belfer
0cf77103b2 Start of filter API + git_blob_filtered_content
This begins the process of exposing git_filter objects to the
public API.  This includes:

* new public type and API for `git_buffer` through which an
  allocated buffer can be passed to the user
* new API `git_blob_filtered_content`
* make the git_filter type and GIT_FILTER_TO_... constants public
2013-09-17 09:30:06 -07:00
Ben Straub
549931679a Merge branch 'development' into blame_rebased
Conflicts:
	include/git2.h
2013-09-16 16:12:31 -07:00
Russell Belfer
a8b5f116bc Fix example/log.c pathspec handling of merges
This fixes the way the example log program decides if a merge
commit should be shown when a pathspec is given.  Also makes it
easier to use the pathspec API to just check "does a tree match
anything in the pathspec" without allocating a match list.
2013-07-10 20:50:32 +02:00
Ben Straub
2532c90343 Initial blame API 2013-06-13 17:19:33 -07:00
Edward Thomson
359fc2d241 update copyrights 2013-01-08 17:31:27 -06:00
Russell Belfer
f684970a10 Merge pull request #1108 from libgit2/ahead-behind-count
Add API to calculate ahead/behind count
2012-11-29 22:53:34 -08:00
Scott J. Goldman
0984c8768d Rename git_count_ahead_behind -> git_graph_ahead_behind
Moved it into graph.{c,h} which i created for the new "graph"
functions namespace. Also adjusted the function prototype
to use `size_t` and `const git_oid *`.
2012-11-28 18:54:57 -08:00
Philip Kelley
613d5eb939 Push! By schu, phkelley, and congyiwu, et al 2012-11-28 11:42:37 -05:00
Vicent Martí
7ae73e94db Merge pull request #1030 from pwkelley/transports
Reorganize transport architecture
2012-11-01 09:15:29 -07:00
Philip Kelley
41fb1ca0ec Reorganize transport architecture (squashed 3) 2012-11-01 09:02:33 -04:00
nulltoken
590fb68be0 stash: add git_stash_save() 2012-10-26 22:10:48 +02:00
Michael Schubert
0a32dca5ec gsoc-pack-objects WIP 2012-10-09 21:28:31 +02:00
Russell Belfer
f004c4a8a7 Add public API for internal ignores
This creates a public API for adding to the internal ignores
list, which already existing but was not accessible.

This adds the new default value for core.excludesfile also.
2012-08-21 17:26:39 -07:00
Ben Straub
5280f4e698 Add checkout.h to git2.h.
Also correcting some documentation strings.
2012-07-31 19:39:06 -07:00
Ben Straub
bfc6563405 Merge branch 'development' into clone 2012-07-17 08:08:34 -07:00
Vicent Marti
111ee3fe2d Add missing includes 2012-07-11 14:37:26 +02:00
Ben Straub
764df57e82 Add git_clone and git_clone_bare.
So far they only create a repo, setup the "origin"
remote, and fetch. The API probably needs work as
well; there's no way to get progress information
at this point.

Also uncovered a shortcoming; git_remote_download
doesn't fetch over local transport.
2012-06-21 09:53:44 -07:00
nulltoken
743a4b3bdd message: Expose git_message_prettify()
git_commit() and git_tag() no longer prettify the
message by default. This has to be taken care of
by the caller.

This has the nice side effect of putting the
caller in position to actually choose to strip
the comments or not.
2012-06-19 10:02:22 +02:00
Vicent Martí
6c08e69fd9 Merge pull request #669 from nulltoken/topic/reset
Add git_reset()
2012-06-07 12:30:20 -07:00
nulltoken
edebceffef Add git_reset()
Currently supports Soft and Mixed modes.
2012-06-07 21:27:30 +02:00
Ben Straub
a346992f7e Rev-parse: @{time} syntax.
Ported date.c (for approxidate_careful) from git.git
revision aa39b85. Trimmed out the parts we're not
using.
2012-05-11 11:35:50 -07:00
Carlos Martín Nieto
bf787bd87c Move git_merge_base() to is own header and document it 2012-04-12 20:25:25 +02:00