Commit Graph

898 Commits

Author SHA1 Message Date
Nikolai Vladimirov
a952b9867d remove git_remote_pushspec 2013-04-23 21:28:28 +03:00
Carlos Martín Nieto
9a9de29d36 Document the odb backend constructors 2013-04-23 19:09:45 +02:00
Vicent Marti
d877159260 cache: Max cache size, and evict when the cache fills up 2013-04-22 17:04:52 +02:00
Vicent Marti
ee12272d17 Global option setters 2013-04-22 16:50:51 +02:00
Vicent Marti
e16e268457 No longer needed 2013-04-22 16:50:51 +02:00
Vicent Martí
a472f887fe Merge pull request #1493 from carlosmn/remotes
Revamp the refspec handling
2013-04-22 07:44:32 -07:00
Russell Belfer
21ca045100 Move git_reference__alloc to include/git2/sys
Create a new include/git2/sys/refs.h and move the reference alloc
functions there.  Also fix some documentation issues and some
minor code cleanups.
2013-04-21 12:52:17 -07:00
Russell Belfer
4dcd878019 Move refdb_backend to include/git2/sys
This moves most of the refdb stuff over to the include/git2/sys
directory, with some minor shifts in function organization.

While I was making the necessary updates, I also removed the
trailing whitespace in a few files that I modified just because I
was there and it was bugging me.
2013-04-21 11:57:21 -07:00
Russell Belfer
9233b3de4e Move git_commit_create_from_oids into sys/commit.h
Actually this renames git_commit_create_oid to
git_commit_create_from_oids and moves the API declaration to
include/git2/sys/commit.h since it is a dangerous API for general
use (because it doesn't check that the OID list items actually
refer to real objects).
2013-04-21 11:50:56 -07:00
John Wiegley
9255039898 Added git_commit_create_oid 2013-04-21 11:50:56 -07:00
Russell Belfer
1384b688d0 Move some low-level repo fns to include/git2/sys 2013-04-21 11:50:56 -07:00
John Wiegley
7cc3c92027 Added git_repository_new function 2013-04-21 11:50:56 -07:00
Russell Belfer
83cc70d9fe Move odb_backend implementors stuff into git2/sys
This moves some of the odb_backend stuff that is related to the
internals of an odb_backend implementation into include/git2/sys.

Some of the stuff related to streaming I left in include/git2
because it seemed like it would be reasonably needed by a normal
user who wanted to stream objects into and out of the ODB.

Also, I added APIs for traversing the list of backends so that
some of the tests would not need to access ODB internals.
2013-04-21 11:50:55 -07:00
Russell Belfer
83041c711c Move git_config_backend to include/git2/sys
Moving backend implementor objects into include/git2/sys so the
APIs can be isolated from the ones that normal libgit2 users
would be likely to use.
2013-04-21 11:50:55 -07:00
Carlos Martín Nieto
1be680c4d0 refspec: unify the string and parsed data
It used to be separate as an attempt to make the querying easier, but
it didn't work out that way, so put all the data together.

Add git_refspec_string() as well to get the original string, which is
now stored alongside the independent parts.
2013-04-20 19:45:40 +02:00
Carlos Martín Nieto
bc6374eac4 remote: allow querying for refspecs
Introduce git_remote_{fetch,push}_refspecs() to get a list of refspecs
from the remote and rename the refspec-adding functions to a less
silly name.

Use this instead of the vector index hacks in the tests.
2013-04-20 19:45:40 +02:00
Carlos Martín Nieto
4330ab26b5 remote: handle multiple refspecs
A remote can have a multitude of refspecs. Up to now our git_remote's
have supported a single one for each fetch and push out of simplicity
to get something working.

Let the remotes and internal code know about multiple remotes and get
the tests passing with them.

Instead of setting a refspec, the external users can clear all and add
refspecs. This should be enough for most uses, though we're still
missing a querying function.
2013-04-20 17:54:13 +02:00
Edward Thomson
4e4eab52f7 alloc doesn't take a refdb; git_refdb_free nicely in the tests 2013-04-19 18:43:17 -05:00
Carlos Martín Nieto
4a38143c93 remote: specify what values direction can mean in git_remote_connect()
This fixes #1487
2013-04-19 23:55:37 +02:00
Vicent Marti
437d36662e repository: Doc fix 2013-04-18 00:15:29 +02:00
Vicent Martí
0d9bf89083 Merge pull request #1475 from libgit2/vmg/refs-peel
Allow access to the cached peel data in packed-refs
2013-04-17 14:59:28 -07:00
Vicent Marti
3be933b143 refs: Add git_referene_target_peel 2013-04-17 17:33:51 +02:00
Vicent Marti
a442ed687d repository: Add git_repository_open_bare 2013-04-17 04:46:37 +02:00
Vicent Marti
f124ebd457 libgit2 0.18.0 "Big Ben"
This is the last minor release before 1.0preview1.

Highlights of this release include:

- Branch API
- Checkout head, index and tree
- Finished clone support
- Abstracted reference API to use custom backends
- Full diff support
- New (faster) packbuilder
- Push support
- New Remotes API
- Revparse support (single and range commits)
- Stash support
- Submodules support

As always, the full changelog is available at:

	http://libgit2.github.com/libgit2/#p/changelog

Yeah, it's a huge release. Releasing stuff sucks.
Expect 1.0 and API freeze in less than a month.

Your faithful maintainer,
	 vmg

Signed-off-by: Vicent Marti <tanoku@gmail.com>
2013-04-16 17:45:12 +02:00
Vicent Marti
e13a0647a0 Update docs 2013-04-15 23:54:28 +02:00
Vicent Marti
cbda09d00b git_revision -> git_revspec 2013-04-15 23:40:46 +02:00
Vicent Marti
36c2dfed69 Is this crazy? 2013-04-15 23:32:40 +02:00
Vicent Marti
d064c74794 Merge remote-tracking branch 'ben/unified-revparse' into development 2013-04-15 23:18:24 +02:00
Ben Straub
201566539f Clean up minor details 2013-04-15 13:29:40 -07:00
Ben Straub
299a224be1 Change git_revparse to output git_object pointers
This will probably prevent many lookup/free
operations in calling code.
2013-04-15 12:00:04 -07:00
Ben Straub
4291ad0781 Reintroduce git_revparse_single. 2013-04-15 11:42:34 -07:00
Vicent Martí
ea8bac37b0 Merge pull request #1450 from carlosmn/branch-upstream
Branch upstream configuration
2013-04-11 06:34:59 -07:00
Carlos Martín Nieto
d59942c2ab branch: add more upstream configuration management
Add functions to set and unset the upstream configuration to
complement the getter we already have.
2013-04-11 12:27:25 +02:00
Vicent Marti
575a54db85 object: Export git_object_dup 2013-04-10 16:56:32 +02:00
Russell Belfer
ad26434b3b Tests and more fixes for submodule diffs
This adds tests for diffs with submodules in them and (perhaps
unsurprisingly) requires further fixes to be made.  Specifically,
this fixes:

- when considering if a submodule is dirty in the workdir, it was
  being treated as dirty even if only the index was dirty.
- git_diff_patch_to_str (and git_diff_patch_print) were "printing"
  the headers for files (and submodules) that were unmodified or
  had no meaningful content.
- added comment to previous fix and removed unneeded parens.
2013-04-09 14:52:32 -07:00
Ben Straub
1aa21fe3b8 Deprecate git_revparse_single and _rangelike 2013-04-09 05:07:04 +04:00
Ben Straub
8480eef7ee Implement unified git_revparse 2013-04-08 16:36:11 +04:00
Ben Straub
4d13d07ab2 Propose unified rev-parse API 2013-04-08 16:35:09 +04:00
Vicent Marti
d9ecaf8c6f Merge remote-tracking branch 'gnprice/revwalk' into development 2013-04-07 07:22:38 +02:00
Greg Price
af079d8bf6 revwalk: Parse revision ranges
All the hard work is already in revparse.

Signed-off-by: Greg Price <price@mit.edu>
2013-04-06 20:51:16 -07:00
Greg Price
b208d90022 revparse: Parse range-like syntax
Signed-off-by: Greg Price <price@mit.edu>
2013-04-06 20:51:16 -07:00
Edward Thomson
c869e26878 export git_reference__alloc 2013-04-02 18:57:42 -05:00
nulltoken
b08c317346 branch: Fix git_branch_create() documentation 2013-04-01 22:01:13 +02:00
Greg Price
804c5f5627 Fix puzzling doc comment
Signed-off-by: Greg Price <price@mit.edu>
2013-03-31 15:33:22 -07:00
nulltoken
24cb87e2a6 tag: Fix parsing when no tagger nor message 2013-03-31 14:36:51 +02:00
Carlos Martín Nieto
a258d8e357 branch: rename 'tracking' to 'upstream'
The term 'tracking' is overloaded. Help distinguish what we mean by
using 'upstream' for this part of the library.
2013-03-30 15:45:57 +01:00
Carlos Martín Nieto
81b8c9df46 transport: don't try to export nonexistent function 2013-03-30 04:50:53 +01:00
Vicent Martí
0b061b5bfa Merge pull request #1436 from schu/opts-cache-size
opts: allow configuration of odb cache size
2013-03-26 11:05:57 -07:00
Russell Belfer
37ee70fab4 Implement GIT_STATUS_OPT_EXCLUDE_SUBMODULES
This option has been sitting unimplemented for a while, so I
finally went through and implemented it along with some tests.

As part of this, I improved the implementation of
GIT_DIFF_IGNORE_SUBMODULES so it be more diligent about avoiding
extra work and about leaving off delta records for submodules to
the greatest extent possible (though it may include them still
if you are request TYPECHANGE records).
2013-03-25 22:19:39 -07:00
Russell Belfer
0c289dd7c6 Recursing into ignored dirs for diff and status
This implements working versions of GIT_DIFF_RECURSE_IGNORED_DIRS
and GIT_STATUS_OPT_RECURSE_IGNORED_DIRS along with some tests for
the newly available behaviors.  This is not turned on by default
for status, but can be accessed via the options to the extended
version of the command.
2013-03-25 16:40:16 -07:00