Commit Graph

72 Commits

Author SHA1 Message Date
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
Russell Belfer
bfc9ca595a Added submodule API and use in status
When processing status for a newly checked out repo, it is
possible that there will be submodules that have not yet been
initialized.  The only way to distinguish these from untracked
directories is to have some knowledge of submodules.  This
commit adds a new submodule API which, given a name or path,
can determine if it appears to be a submodule and can give
information about the submodule.
2012-03-28 16:45:36 -07:00
Russell Belfer
65b09b1ded Implement diff lists and formatters
This reworks the diff API to separate the steps of producing
a diff descriptions from formatting the diff.  This will allow
us to share diff output code with the various diff creation
scenarios and will allow us to implement rename detection as
an optional pass that can be run on a diff list.
2012-03-02 15:49:28 -08:00
Vicent Martí
6117895fef Merge pull request #558 from schu/notes-api
Notes API
2012-02-15 11:38:40 -08:00
schu
bf477ed4a8 Add git notes API
This commit adds basic git notes support to libgit2, namely:

* git_note_read
* git_note_message
* git_note_oid
* git_note_create
* git_note_remove

In the long run, we probably want to provide some convenience callback
mechanism for merging and moving (filter-branch) notes.

Signed-off-by: schu <schu-github@schulog.org>
2012-02-15 20:32:14 +01:00
Vicent Martí
0c3bae6268 zlib: Remove custom git2/zlib.h header
This is legacy compat stuff for when `deflateBound` is not defined, but
we're not embedding zlib and that function is always available. Kill
that with fire.
2012-02-15 16:56:56 +01:00
schu
5e0de32818 Update Copyright header
Signed-off-by: schu <schu-github@schulog.org>
2012-02-13 17:11:09 +01:00
Vicent Marti
d88d4311c7 remote: Cleanup the remotes code
- Hide the remaining transports code
- Drop `git_headarray`, switch to using a callback to list refs. Makes
the code cleaner.
2011-11-28 08:40:40 +01:00
Vicent Marti
a15c550db8 threads: Fix the shared global state with TLS
See `global.c` for a description of what we're doing.

When libgit2 is built with GIT_THREADS support, the threading system
must be explicitly initialized with `git_threads_init()`.
2011-11-16 14:09:44 +01:00
Sven Strickroth
96fab093e3 put version information in separate file
Signed-off-by: Sven Strickroth <email@cs-ware.de>
2011-10-09 18:39:52 +02:00
Vicent Marti
3eaf34f4c6 libgit2 v0.15.0 "Das Wunderbar Release"
I am aware the codename is not gramatically correct in any language.

Check the COPYING file for the detailed terms on libgit2's license. Check
the AUTHORS file for the full list of guilty parties.

As we slowly stabilize the API, we've dropped 1 function from the library,
and changed the signature of only 5 of them. There's of course a good
chunk of new functionality, and a thousand bug fixes.

In this release of libgit2:

	- Changed `git_blob_rawsize`: Now returns `size_t` instead of int, allowing
	files >4GB in 64 bit systems.

	- Removed `git_commit_message_short`: Please use `git_commit_message`
	to get the full message and decide which is the "short view" according
	to your needs (first line, first 80 chars...)

	- Added `git_commit_message_encoding`: Returns the encoding field of a commit
	message, if it exists.

	- Changed `git_commit_create`, `git_commit_create_v`: New argument `encoding`, which
	adds a encoding field to the generated commit object.

	- Added `git_config_find_system`: Returns the path to the system's global config
	file (according to the Core Git standards).

	- Changed `git_config_get_XX`, `git_config_set_XX`: the `long` and `int` types have
	been replaced by `int64` and `int32` respectively, to make their meaning more
	obvious.

	- Added `git_indexer`: An interface to index Git Packfiles has been added in the
	`git2/indexer.h` header.

	- Changed `git_reflog_entry_XX`: Reflog entries are now returned as `git_oid *` objects
	instead of hexadecimal OIDs.

	- Added `git_remote`: More fetch functionality has been added to the `git2/remote.h`
	functionality. Local, Smart HTTP and Git protocols are now supported.

	- Added `git_repository_head`: Returns the HEAD of the repository.

	- Added `git_repository_config_autoload`: Opens the configuration file of a repository,
	including the user's and the system's global config files, if they can be found.

	- Changed `git_signature_now`: Now returns an error code; the signature is stored by
	reference.
2011-10-05 16:48:36 -04:00