summaryrefslogtreecommitdiff
path: root/include/git2/remote.h
Commit message (Collapse)AuthorAgeFilesLines
* network: add sideband supportCarlos Martín Nieto2012-08-241-1/+1
| | | | | This lets us notify the user of what the remote end is doing while we wait for it to start sending us the packfile.
* Merge remote-tracking branch 'arrbee/tree-walk-fixes' into developmentVicent Marti2012-08-061-1/+4
|\ | | | | | | | | | | | | | | | | Conflicts: src/notes.c src/transports/git.c src/transports/http.c src/transports/local.c tests-clar/odb/foreach.c
| * Update iterators for consistency across libraryRussell Belfer2012-08-031-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge pull request #834 from carlosmn/network-callbacksVicent Martí2012-07-271-1/+34
|\ \ | | | | | | Add a struct for network callbacks
| * | Add a struct for network callbacksCarlos Martín Nieto2012-07-211-1/+34
| |/ | | | | | | | | Currently only update_tips is used, but it prepares the way for progress output during download.
* | Remotes: Setter for url+pushurl; Getter for pushurlSascha Cunz2012-07-261-0/+30
|/
* Merge pull request #697 from carlosmn/sslVicent Martí2012-06-051-0/+9
|\ | | | | Add HTTPS support
| * ssl: allow skipping the server certificate checkCarlos Martín Nieto2012-05-261-0/+9
| | | | | | | | | | Sometimes it's useful not to perform the check. Allow it to be configurable.
* | Fix spelling errors.Bruce Mitchener2012-05-191-4/+4
|/
* errors: Rename the generic return codesVicent Martí2012-05-181-9/+9
|
* remotes: change git_remote_new's signatureCarlos Martín Nieto2012-05-081-2/+3
| | | | | Add a fetch refspec arguemnt and make the arguments (name, url, refspec), as that order makes more sense.
* remote: add git_remote_add()Carlos Martín Nieto2012-05-081-0/+10
| | | | Helper function to create a remote with the default settings
* Merge branch 'new-error-handling' into developmentVicent Martí2012-05-021-5/+7
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * remote: add more doc on git_remote_freeMichael Schubert2012-04-281-0/+3
| |
| * remote: run a callback when updating the branch tipsCarlos Martín Nieto2012-04-251-4/+2
| | | | | | | | | | | | | | | | 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.
| * transports: buffer the git requests before sending themCarlos Martín Nieto2012-04-251-0/+1
| | | | | | | | | | | | 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.
| * fetch: use the streaming indexer when downloading a packCarlos Martín Nieto2012-04-251-1/+1
| | | | | | | | | | | | | | | | 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.
* | Make git_remote_supported_url() public and shorten error stringCarlos Martín Nieto2012-03-051-0/+8
|/
* Add git_remote_list()Carlos Martín Nieto2012-02-261-0/+11
| | | | | Loops through the configuration and generates a list of configured remotes.
* Add git_remote_save()Carlos Martín Nieto2012-02-201-0/+8
|
* Add git_remote_set_{fetch,push}spec()Carlos Martín Nieto2012-02-201-0/+18
| | | | | Allow setting the fetch and push refspecs, which is useful for creating new refspecs.
* Update Copyright headerschu2012-02-131-1/+1
| | | | Signed-off-by: schu <schu-github@schulog.org>
* remote: Cleanup the remotes codeVicent Marti2011-11-281-1/+11
| | | | | | - Hide the remaining transports code - Drop `git_headarray`, switch to using a callback to list refs. Makes the code cleaner.
* repository: Change ownership semanticsVicent Marti2011-11-261-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Add a note not to free the result from git_remote_lsCarlos Martín Nieto2011-11-221-1/+2
|
* Add git_remote_connectedCarlos Martín Nieto2011-11-211-0/+10
| | | | Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* Add git_remote_disconnectCarlos Martín Nieto2011-11-211-0/+10
| | | | | | | It can be useful to separate disconnecting from actually destroying the object. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* Add a name to a remote created from the APICarlos Martín Nieto2011-11-181-3/+5
| | | | | | Make it a bit more resilient. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* remote: get rid of git_remote_negotiateCarlos Martín Nieto2011-11-181-12/+5
| | | | | | | There is no good reason to expose the negotiation as a different step to downloading the packfile. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* include: Unify internal include strategiesVicent Marti2011-11-181-3/+3
| | | | | Do not add the `git2` path to internal includes, or that will cause an extra path dependency.
* Cleanup legal dataVicent Marti2011-09-191-22/+4
| | | | | | | | | | 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.
* Standardized doxygen @return lines for int functions to say "GIT_SUCCESS or ↵David Boyce2011-09-131-2/+2
| | | | an error code".
* Add git_remote_newCarlos Martín Nieto2011-08-301-0/+12
| | | | | | | As we no longer expose the transport functions, this is now the only way to connect to a remote when given an URL instead of a remote name Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* Add git_remote_update_tipsCarlos Martín Nieto2011-08-181-0/+10
| | | | | | | This function updates the references in the local reference storage to match the ones in the remote. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* Only wait for pack if we need itCarlos Martín Nieto2011-08-181-0/+14
| | | | | | | Provide the git_remote_download function to instruct the library to downlad the packfile and let the user know the temporary location. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* Don't expose the fetch code to the userCarlos Martín Nieto2011-08-181-1/+12
| | | | | | | | Move the generation of the want-list to be done from the negotiate function, and keep the filtered references inside the remote structure. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* Fix compilation in C++: remove double GIT_BEGIN_DECLMarcel Groothuis2011-07-291-9/+0
|
* Fixup network headersCarlos Martín Nieto2011-07-271-1/+9
| | | | | | The network headers were still missing some formalities. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* typo: one git_remote_fetchspec should be pushspecCarlos Martín Nieto2011-07-131-1/+1
| | | | Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* Cleanup external APIVicent Marti2011-07-111-0/+35
| | | | | Some of the WIP API calls have been hidden in preparation for the next minor release.
* Slim down git_transportCarlos Martín Nieto2011-06-271-1/+1
| | | | | | | | Remove the unused repo and private pointers and make the direction a flag, as it can only have two states. Change the connect signature to use an int instead of git_net_direction and remove that enum. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* Add git_remote_connect and git_remote_lsCarlos Martín Nieto2011-06-271-0/+21
| | | | | | | These allow you to implement git-ls-remote when given a reference name and a repository. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* Add a to-do list for remotesCarlos Martín Nieto2011-06-261-0/+8
| | | | Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* Add a remotes APICarlos Martín Nieto2011-06-261-0/+58
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>