summaryrefslogtreecommitdiff
path: root/examples/network/fetch.c
Commit message (Collapse)AuthorAgeFilesLines
* examples: fix warnings in network/fetch.cPatrick Steinhardt2016-10-101-7/+7
|
* fix returnEun2015-10-071-0/+1
|
* Merge pull request #3306 from libgit2/cmn/fetch-ex-fetchCarlos Martín Nieto2015-07-131-74/+27
|\ | | | | examples: modernise the fetch example
| * examples: modernise the fetch examplecmn/fetch-ex-fetchCarlos Martín Nieto2015-07-121-74/+27
| | | | | | | | | | Under normal conditions, git_remote_fetch() should be the only function used to perform a fetch. Don't let the example lead people astray.
* | Fix #3094 - improve use of portable size_t/ssize_t format specifiers.Matthew Plough2015-07-121-2/+2
|/ | | | The header src/cc-compat.h defines portable format specifiers PRIuZ, PRIdZ, and PRIxZ. The original report highlighted the need to use these specifiers in examples/network/fetch.c. For this commit, I checked all C source and header files not in deps/ and transitioned to the appropriate format specifier where appropriate.
* remote: remove fetch parameter from create_anonymousCarlos Martín Nieto2015-05-281-1/+1
| | | | | | An anonymous remote is not configured and cannot therefore have configured refspecs. Remove the parameter which adds this from the constructor.
* examples: adjust to the new remote APICarlos Martín Nieto2015-05-131-8/+9
|
* Remove the signature from ref-modifying functionsCarlos Martín Nieto2015-03-031-1/+1
| | | | | | | | | | The signature for the reflog is not something which changes dynamically. Almost all uses will be NULL, since we want for the repository's default identity to be used, making it noise. In order to allow for changing the identity, we instead provide git_repository_set_ident() and git_repository_ident() which allow a user to override the choice of signature.
* remote: rename _load() to _lookup()cmn/remote-lookupCarlos Martín Nieto2014-11-081-1/+1
| | | | This brings it in line with the rest of the lookup functions.
* remote: allow overriding the refspecs for download and fetchCarlos Martín Nieto2014-09-301-1/+1
| | | | | | | With opportunistic ref updates, git has introduced the concept of having base refspecs *and* refspecs that are active for a particular fetch. Let's start by letting the user override the refspecs for download.
* Fix typoLinquize2014-09-161-1/+1
|
* Don't redefine the same callback types, their signatures may changeJacques Germishuys2014-04-211-1/+1
|
* remote: rename inmemory to anonymous and swap url and fetch orderCarlos Martín Nieto2014-04-011-1/+1
| | | | | | | | | | The order in this function is the opposite to what create_with_fetchspec() has, so change this one, as url-then-refspec is what git does. As we need to break compilation and the swap doesn't do that, let's take this opportunity to rename in-memory remotes to anonymous as that's really what sets them apart.
* Fix a few references to changed function signaturesBen Straub2014-02-051-1/+1
|
* Fix warningsBen Straub2013-11-041-2/+2
|
* Fix typosBen Straub2013-11-011-2/+2
|
* A few formatting changes for roccoCarlos Martín Nieto2013-11-011-0/+11
| | | | | I'm not too happy about manually inserting < and > but those get output as html tags otherwise.
* Merge pull request #1891 from libgit2/cmn/fix-thin-packsVicent Martí2013-10-281-2/+12
|\ | | | | Add support for thin packs
| * indexer: include the delta statsCarlos Martín Nieto2013-10-231-1/+6
| | | | | | | | | | | | | | | | | | | | The user is unable to derive the number of deltas in the pack, as that would require them to capture the stats exactly in the moment between download and final processing, which is abstracted away in the fetch. Capture these numbers for the user and expose them in the progress struct. The clone and fetch examples now also present this information to the user.
| * examples: show used local objects in fetchCarlos Martín Nieto2013-10-231-1/+6
| | | | | | | | | | Show how many local objects were used to fix the thin pack in our fetch example.
* | remote: move the credentials callback to the structCarlos Martín Nieto2013-10-021-1/+1
| | | | | | | | | | Move this one as well, letting us have a single way of setting the callbacks for the remote, and removing fields from the clone options.
* | remote: put the _download() callback with the othersCarlos Martín Nieto2013-10-021-1/+1
|/ | | | | | The text progress and update_tips callbacks are already part of the struct, which was meant to unify the callback setup, but the download one was left out.
* Adding credentials callback to ls-remote and fetch too.Krzysztof Adamski2013-09-011-0/+1
|
* Fix clang warnings and improve checksRussell Belfer2013-04-091-3/+7
|
* update examples to work on windowsEdward Thomson2013-01-231-3/+12
|
* Don't call pthread_exit() in the callback.Sebastian Bauer2013-01-101-1/+1
| | | | | | | | Compilers that are not aware that pthread_exit() does not return issue a warning when compiling the present code. This change exchanges the call to pthread_exit() with a simple return statement. According to the pthread specification this is equivalent.
* Move `url` to last place in parameter listBen Straub2013-01-021-1/+1
|
* Fix examplesBen Straub2012-12-211-1/+1
|
* Rename remote creation APIsBen Straub2012-12-201-1/+1
| | | | git_remote_add -> git_remote_create git_remote_new -> git_remote_create_inmemory
* Deploy GIT_REMOTE_CALLBACKS_INITBen Straub2012-11-301-2/+1
|
* API updates for remote.hBen Straub2012-11-271-1/+1
| | | | | Includes typedef for git_direction, and renames for GIT_DIR_[FETCH|PUSH] to GIT_DIRECTION_(\1).
* Fix various cross-platform build issuesRussell Belfer2012-11-091-2/+2
| | | | | | This fixes a number of warnings and problems with cross-platform builds. Among other things, it's not safe to name a member of a structure "strcmp" because that may be #defined.
* Remove 'bytes' param from git_remote_downloadBen Straub2012-10-241-6/+3
|
* Renaming: fix exampleBen Straub2012-10-241-3/+5
|
* Network progress: rename thingsBen Straub2012-10-241-1/+1
| | | | | | | git_indexer_stats and friends -> git_transfer_progress* Also made git_transfer_progress members more sanely named.
* Fix example compilationBen Straub2012-10-191-1/+1
|
* Add accessor for git_remote's stats fieldBen Straub2012-10-191-9/+8
| | | | Also converted the network example to use it.
* examples: add progress output to fetchCarlos Martín Nieto2012-08-241-1/+13
|
* indexer: recognize and mark when all of the packfile has been downloadedCarlos Martín Nieto2012-08-241-1/+1
| | | | | We can't always rely on the network telling us when the download is finished. Recognize it from the indexer itself.
* examples: fix warnings in network/Carlos Martín Nieto2012-07-301-4/+5
|
* remote: start moving the protocol to a common areaCarlos Martín Nieto2012-07-301-0/+3
| | | | | | | For the transition, http is going to keep its own logic until the git/common code catches up with the implied multi_ack that http has. This also has the side-effect of making the code cleaner and more correct regardingt he protocol.
* Add a struct for network callbacksCarlos Martín Nieto2012-07-211-2/+9
| | | | | Currently only update_tips is used, but it prepares the way for progress output during download.
* Updates from comments on OS4 compatibility pull request ↵Chris Young2012-06-141-6/+1
| | | | http://github.com/libgit2/libgit2/pull/766
* allow disabling pthreads for testingChris Young2012-06-091-0/+6
|
* examples/network: consistently use tabs for indentationCarlos Martín Nieto2012-05-241-50/+50
|
* remotes: change git_remote_new's signatureCarlos Martín Nieto2012-05-081-1/+1
| | | | | Add a fetch refspec arguemnt and make the arguments (name, url, refspec), as that order makes more sense.
* remote: don't free transport on disconnectMichael Schubert2012-05-021-0/+3
| | | | | | | | | | | | | | | | | | | | | | Currently, git_remote_disconnect not only closes the connection but also frees the underlying transport object, making it impossible to write code like // fetch stuff git_remote_download() // close connection git_remote_disconnect() // call user provided callback for each ref git_remote_update_tips(remote, callback) because remote->refs points to references owned by the transport object. This means, we have an idling connection while running the callback for each reference. Instead, allow immediate disconnect and free the transport later in git_remote_free().
* remote: run a callback when updating the branch tipsCarlos Martín Nieto2012-04-251-1/+20
| | | | | | | | 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.
* examples: run fetch in a background threadCarlos Martín Nieto2012-04-251-13/+56
| | | | This allows us to give updates on how it's doing
* examples: port 'fetch' to the new APICarlos Martín Nieto2012-04-251-71/+22
|