Commit Graph

62 Commits

Author SHA1 Message Date
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
Vicent Marti
bb742ede3d Cleanup legal data
1. The license header is technically not valid if it doesn't have a
copyright signature.

2. The COPYING file has been updated with the different licenses used in
the project.

3. The full GPLv2 header in each file annoys me.
2011-09-19 01:54:32 +03:00
Carlos Martín Nieto
3412391d4c Intial indexer code 2011-08-02 21:41:02 +02:00
Marcel Groothuis
c7b508e63b Remove double include of remote.h from git2.h 2011-07-29 19:29:47 +02:00
Julien Miotte
b311e3132a Including git2/status.h in the git2.h header. 2011-07-27 18:33:20 +02:00
Vicent Marti
52e50c1a80 libgit2 v0.14.0, "watermelon wheat"
This a very packed minor release. The usual guilty parties have been
working harder than usual during the holidays -- thanks to everyone
involved!

As always, the updated API docs can be found at:

	http://libgit2.github.com/libgit2/

NEW FEATURES:

	- New OS abstraction layer. This should make all POSIX calls much
	more reliable under Windows.

	- Much faster writes of simple objects (commits, tags, trees) to the
	ODB via in-memory buffering and direct writes, instead of streaming.

	- Unified & simplified API for object creation. All the `create`
	methods now take Objects instead of OIDs to ensure that corrupted
	(dangling) objects cannot be created on the repository.

	- Fully Git-compilant reference renaming (finally!), with
	the already existing `git_reference_rename`.

	- Deletion of config keys with `git_config_delete`

	- Greatly improved index performance when adding new entries

	- Reflog support with the `git_reflog` API

	- Remotes support with the `git_remote` API

	- First parts of the Networking API, including refspecs and
	the transport abstraction layer. (Note that there are no actual
	transports implemented yet)

	- Status support with the `git_status_foreach` and `git_status_file`
	functions.

	- Tons of bugfixes, including the outstanding bug #127 (wrong sort
	ordering when querying tree entries).

KNOWN ISSUES:

	- The reference renaming code leaks memory. This is being worked on
	as part of a reference handling overhaul.

	- The tree-from-index builder has abysmal performance because it
	doesn't handle the Treecache extension yet. This is also being
	worked on.

FULL API CHANGELOG:

	- removed, * modified, + added

	- git_commit_create_o
	- git_commit_create_ov
	- git_reference_create_oid_f
	- git_reference_create_symbolic_f
	- git_reference_rename_f
	- git_tag_create_f
	- git_tag_create_fo
	- git_tag_create_o

	* git_commit_create
	* git_commit_create_v
	* git_config_foreach
	* git_reference_create_oid
	* git_reference_create_symbolic
	* git_reference_rename
	* git_tag_create
	* git_tag_create_frombuffer

	+ git_clearerror
	+ git_config_delete
	+ git_index_uniq
	+ git_odb_hashfile
	+ git_oid_fromstrn
	+ git_reflog_entry_byindex
	+ git_reflog_entry_committer
	+ git_reflog_entry_msg
	+ git_reflog_entry_oidnew
	+ git_reflog_entry_oidold
	+ git_reflog_entrycount
	+ git_reflog_free
	+ git_reflog_read
	+ git_reflog_write
	+ git_refspec_src_match
	+ git_refspec_transform
	+ git_remote_connect
	+ git_remote_fetchspec
	+ git_remote_free
	+ git_remote_get
	+ git_remote_ls
	+ git_remote_name
	+ git_remote_url
	+ git_repository_head_detached
	+ git_repository_head_orphan
	+ git_status_file
	+ git_status_foreach
	+ git_tag_create_lightweight
	+ git_tag_list_match
	+ git_transport_new
2011-07-14 03:26:08 +02:00
Vicent Marti
bdd18829ad Cleanup external API
Some of the WIP API calls have been hidden in preparation for the next
minor release.
2011-07-11 02:59:18 +02:00
schu
27df4275f2 reflog: add API to read or write a reference log
So far libgit2 didn't support reference logs (reflog). Add a new
git_reflog_* API for basic reading and writing of reflogs:

* git_reflog_read
* git_reflog_write
* git_reflog_free

Signed-off-by: schu <schu-github@schulog.org>
2011-07-09 02:40:16 +02:00
Carlos Martín Nieto
b31803f310 pkt-line: parse other-ref lines
Add support for parsing other-ref lines.

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-06-26 18:18:12 +02:00
Carlos Martín Nieto
d6258debbe Implement ls-remote on local drive
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-06-26 18:18:12 +02:00
Carlos Martín Nieto
2dc31040a2 Abstract the refspec query and parse
Move them to their own functions to avoid duplication and to make it
easier to ignore missing configuration.

Not finding 'fetch' is considered fatal, though this might not be
correct behaviour (push-only remotes?)

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-06-26 18:18:10 +02:00