Commit Graph

68 Commits

Author SHA1 Message Date
Vicent Martí
e05ca13f1f Merge pull request #1115 from ben/struct-versions
Version info for public structs
2012-12-05 11:47:19 -08:00
nulltoken
032ba9e4ad remote: deploy EINVALIDSPEC usage 2012-12-01 08:34:23 +01:00
Ben Straub
9267ff586f Deploy GIT_REMOTE_CALLBACKS_INIT 2012-11-30 13:12:15 -08:00
Ben Straub
bde336ea51 Add version fields and init macros for public input structs. 2012-11-30 12:55:45 -08:00
Ben Straub
f4a62c306d Typedef enums. 2012-11-27 14:13:03 -08:00
Ben Straub
df705148ec API updates for remote.h
Includes typedef for git_direction, and renames for
GIT_DIR_[FETCH|PUSH] to GIT_DIRECTION_(\1).
2012-11-27 13:19:49 -08:00
Edward Thomson
b0f6e45d14 create FETCH_HEAD specially instead of as a ref file 2012-11-11 11:56:33 -06:00
Brian Schroeder
b0b8065880 Update documentation in remote.h 2012-11-08 21:28:15 -08:00
Philip Kelley
091361f569 Basic authentication for http and winhttp 2012-11-06 08:52:03 -05:00
Philip Kelley
41fb1ca0ec Reorganize transport architecture (squashed 3) 2012-11-01 09:02:33 -04:00
Russell Belfer
1b9346897b Merge pull request #925 from nulltoken/topic/moving-branch-updates-config
Updates config upon moving and deletion of branches
2012-10-25 10:55:03 -07:00
nulltoken
fcccf3045f remote: introduce git_remote_rename() 2012-10-25 17:42:36 +02:00
Ben Straub
1e3b8ed5cf Remove 'bytes' param from git_remote_download 2012-10-24 14:07:07 -07:00
Ben Straub
7d222e1312 Network progress: rename things
git_indexer_stats and friends -> git_transfer_progress*

Also made git_transfer_progress members more sanely
named.
2012-10-24 13:29:14 -07:00
Ben Straub
c4958e6818 Fix documentation comment 2012-10-24 12:38:05 -07:00
Ben Straub
c70ad945cd Update doc strings, warn about callback perf 2012-10-23 09:23:44 -07:00
Ben Straub
216863c48f Fetch/indexer: progress callbacks 2012-10-19 19:36:22 -07:00
Ben Straub
d57c47dc07 Add accessor for git_remote's stats field
Also converted the network example to use it.
2012-10-19 19:34:15 -07:00
Ben Straub
3028be0723 Add git_indexer_stats field to git_remote
Also removing all the *stats parameters from external
APIs that don't need them anymore.
2012-10-19 19:34:14 -07:00
Carlos Martín Nieto
f0d2ddbbf8 remote: support fetch cancelation
Introduce git_remote_stop() which sets a variable that is checked by
the fetch process in a few key places. If this is variable is set, the
fetch is aborted.
2012-10-18 04:31:03 +02:00
Paul Thompson
b46708aaf9 Separated git_strarray from common.h. Added doxy comments. 2012-10-11 23:04:08 +11:00
Carlos Martín Nieto
3230a44f4c remote: support downloading all tags
Also honor remote.$name.tagopt = --tags.
2012-09-30 12:05:28 +02:00
Carlos Martín Nieto
f70e466f68 remote: add accessors for the autotag setting 2012-09-30 12:04:49 +02:00
Carlos Martín Nieto
24f2f94e7d fetch: use the include-tag capability
This tells the remote to send us any tags that point to objects that
we are downloading.
2012-09-30 11:56:38 +02:00
Carlos Martín Nieto
e03e71da56 network: add sideband support
This lets us notify the user of what the remote end is doing while we
wait for it to start sending us the packfile.
2012-08-24 20:29:39 +02:00
Vicent Marti
51e1d80846 Merge remote-tracking branch 'arrbee/tree-walk-fixes' into development
Conflicts:
	src/notes.c
	src/transports/git.c
	src/transports/http.c
	src/transports/local.c
	tests-clar/odb/foreach.c
2012-08-06 12:41:08 +02:00
Russell Belfer
5dca201072 Update iterators for consistency across library
This updates all the `foreach()` type functions across the library
that take callbacks from the user to have a consistent behavior.
The rules are:

* A callback terminates the loop by returning any non-zero value
* Once the callback returns non-zero, it will not be called again
  (i.e. the loop stops all iteration regardless of state)
* If the callback returns non-zero, the parent fn returns GIT_EUSER
* Although the parent returns GIT_EUSER, no error will be set in
  the library and `giterr_last()` will return NULL if called.

This commit makes those changes across the library and adds tests
for most of the iteration APIs to make sure that they follow the
above rules.
2012-08-03 17:08:01 -07:00
Vicent Martí
60d5cc5747 Merge pull request #834 from carlosmn/network-callbacks
Add a struct for network callbacks
2012-07-27 09:52:44 -07:00
Sascha Cunz
765015902a Remotes: Setter for url+pushurl; Getter for pushurl 2012-07-26 23:08:22 +02:00
Carlos Martín Nieto
b3aaa7a7c8 Add a struct for network callbacks
Currently only update_tips is used, but it prepares the way for
progress output during download.
2012-07-21 18:44:01 +02:00
Vicent Martí
966fbdcb8e Merge pull request #697 from carlosmn/ssl
Add HTTPS support
2012-06-05 13:53:33 -07:00
Carlos Martín Nieto
250b95b24b ssl: allow skipping the server certificate check
Sometimes it's useful not to perform the check. Allow it to be
configurable.
2012-05-26 21:17:08 +02:00
Bruce Mitchener
d73c94b21c Fix spelling errors. 2012-05-19 20:26:52 +07:00
Vicent Martí
e172cf082e errors: Rename the generic return codes 2012-05-18 01:26:26 +02:00
Carlos Martín Nieto
baaa8a447e remotes: change git_remote_new's signature
Add a fetch refspec arguemnt and make the arguments (name, url,
refspec), as that order makes more sense.
2012-05-08 21:36:40 +02:00
Carlos Martín Nieto
a209a025c6 remote: add git_remote_add()
Helper function to create a remote with the default settings
2012-05-08 21:36:40 +02:00
Vicent Martí
40879facad Merge branch 'new-error-handling' into development
Conflicts:
	.travis.yml
	include/git2/diff.h
	src/config_file.c
	src/diff.c
	src/diff_output.c
	src/mwindow.c
	src/path.c
	tests-clar/clar_helpers.c
	tests-clar/object/tree/frompath.c
	tests/t00-core.c
	tests/t03-objwrite.c
	tests/t08-tag.c
	tests/t10-refs.c
	tests/t12-repo.c
	tests/t18-status.c
	tests/test_helpers.c
	tests/test_main.c
2012-05-02 15:59:02 -07:00
Michael Schubert
8af503bc85 remote: add more doc on git_remote_free 2012-04-28 20:49:05 +02:00
Carlos Martín Nieto
f184836bd2 remote: run a callback when updating the branch tips
This allows the caller to update an internal structure or update the
user output with the tips that were updated.

While in the area, only try to update the ref if the value is
different from its old one.
2012-04-25 13:25:45 +02:00
Carlos Martín Nieto
dee5515a23 transports: buffer the git requests before sending them
Trying to send every single line immediately won't give us any speed
improvement and duplicates the code we need for other transports. Make
the git transport use the same buffer functions as HTTP.
2012-04-25 12:44:27 +02:00
Carlos Martín Nieto
7a520f5d8a fetch: use the streaming indexer when downloading a pack
This changes the git_remote_download() API, but the existing one is
silly, so you don't get to complain.

The new API allows to know how much data has been downloaded, how many
objects we expect in total and how many we've processed.
2012-04-25 12:39:11 +02:00
Carlos Martín Nieto
4f8efc97c1 Make git_remote_supported_url() public and shorten error string 2012-03-05 19:32:21 +01:00
Carlos Martín Nieto
8171998f8d Add git_remote_list()
Loops through the configuration and generates a list of configured
remotes.
2012-02-26 19:15:36 +01:00
Carlos Martín Nieto
89e5ed98dc Add git_remote_save() 2012-02-20 19:48:41 +01:00
Carlos Martín Nieto
bcb8c007f1 Add git_remote_set_{fetch,push}spec()
Allow setting the fetch and push refspecs, which is useful for
creating new refspecs.
2012-02-20 18:42:05 +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
9462c47143 repository: Change ownership semantics
The ownership semantics have been changed all over the library to be
consistent. There are no more "borrowed" or duplicated references.

Main changes:

	- `git_repository_open2` and `3` have been dropped.

	- Added setters and getters to hotswap all the repository owned
	objects:

		`git_repository_index`
		`git_repository_set_index`
		`git_repository_odb`
		`git_repository_set_odb`
		`git_repository_config`
		`git_repository_set_config`
		`git_repository_workdir`
		`git_repository_set_workdir`

	Now working directories/index files/ODBs and so on can be
	hot-swapped after creating a repository and between operations.

	- All these objects now have proper ownership semantics with
	refcounting: they all require freeing after they are no longer
	needed (the repository always keeps its internal reference).

	- Repository open and initialization has been updated to keep in
	mind the configuration files. Bare repositories are now always
	detected, and a default config file is created on init.

	- All the tests affected by these changes have been dropped from the
	old test suite and ported to the new one.
2011-11-26 08:37:08 +01:00
Carlos Martín Nieto
6616e20750 Add a note not to free the result from git_remote_ls 2011-11-22 11:18:27 +01:00
Carlos Martín Nieto
6ac3b707b1 Add git_remote_connected
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-11-21 21:00:43 +01:00