examples/network/fetch.c


Log

Author Commit Date CI Message
Eun 8b8f1f91 2015-10-07T14:01:05 fix return
Carlos Martín Nieto 97c0a85f 2015-07-13T11:23:07 Merge pull request #3306 from libgit2/cmn/fetch-ex-fetch examples: modernise the fetch example
Matthew Plough 768f8be3 2015-06-30T19:00:41 Fix #3094 - improve use of portable size_t/ssize_t format specifiers. 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.
Carlos Martín Nieto 6c7e86e1 2015-07-12T19:41:01 examples: modernise the fetch example Under normal conditions, git_remote_fetch() should be the only function used to perform a fetch. Don't let the example lead people astray.
Carlos Martín Nieto ae5b9362 2015-05-17T15:11:45 remote: remove fetch parameter from create_anonymous An anonymous remote is not configured and cannot therefore have configured refspecs. Remove the parameter which adds this from the constructor.
Carlos Martín Nieto 3fec548a 2015-04-23T06:01:13 examples: adjust to the new remote API
Carlos Martín Nieto 659cf202 2015-01-07T12:23:05 Remove the signature from ref-modifying functions 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.
Carlos Martín Nieto 209425ce 2014-11-08T13:25:51 remote: rename _load() to _lookup() This brings it in line with the rest of the lookup functions.
Carlos Martín Nieto 3f894205 2014-06-06T15:01:45 remote: allow overriding the refspecs for download and fetch 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.
Linquize 2c22193b 2014-09-16T08:56:33 Fix typo
Jacques Germishuys 48e60ae7 2014-04-21T11:23:29 Don't redefine the same callback types, their signatures may change
Carlos Martín Nieto fd536d29 2014-03-26T11:15:57 remote: rename inmemory to anonymous and swap url and fetch order 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.
Ben Straub 5c8be325 2014-02-05T13:32:45 Fix a few references to changed function signatures
Ben Straub ea8ce3d1 2013-11-04T15:50:33 Fix warnings
Ben Straub 4f62d559 2013-11-01T05:39:21 Fix typos
Carlos Martín Nieto c44820c6 2013-10-31T23:42:50 A few formatting changes for rocco I'm not too happy about manually inserting < and > but those get output as html tags otherwise.
Vicent Martí 5c50f22a 2013-10-28T09:25:44 Merge pull request #1891 from libgit2/cmn/fix-thin-packs Add support for thin packs
Carlos Martín Nieto ab46b1d8 2013-10-23T15:08:18 indexer: include the delta stats 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.
Carlos Martín Nieto ebbd48f0 2013-10-23T14:22:44 examples: show used local objects in fetch Show how many local objects were used to fix the thin pack in our fetch example.
Carlos Martín Nieto e3c131c5 2013-09-16T05:02:25 remote: move the credentials callback to the struct 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.
Carlos Martín Nieto d31402a3 2013-09-16T04:20:05 remote: put the _download() callback with the others 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.
Krzysztof Adamski 255836dd 2013-09-01T18:35:39 Adding credentials callback to ls-remote and fetch too.
Russell Belfer 9da187e8 2013-04-09T11:40:00 Fix clang warnings and improve checks
Edward Thomson c27e2112 2013-01-23T17:38:00 update examples to work on windows
Sebastian Bauer cea994b9 2013-01-10T12:39:17 Don't call pthread_exit() in the callback. 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.
Ben Straub 0642c143 2013-01-02T12:44:47 Move `url` to last place in parameter list
Ben Straub 69d1bd91 2012-12-21T15:30:46 Fix examples
Ben Straub 29f27599 2012-12-20T10:51:09 Rename remote creation APIs git_remote_add -> git_remote_create git_remote_new -> git_remote_create_inmemory
Ben Straub 9267ff58 2012-11-29T20:01:24 Deploy GIT_REMOTE_CALLBACKS_INIT
Ben Straub df705148 2012-11-27T13:15:43 API updates for remote.h Includes typedef for git_direction, and renames for GIT_DIR_[FETCH|PUSH] to GIT_DIRECTION_(\1).
Russell Belfer 0f3def71 2012-11-09T11:19:46 Fix various cross-platform build issues 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.
Ben Straub 1e3b8ed5 2012-10-24T14:07:07 Remove 'bytes' param from git_remote_download
Ben Straub 9762ad99 2012-10-24T13:43:23 Renaming: fix example
Ben Straub 7d222e13 2012-10-24T13:29:14 Network progress: rename things git_indexer_stats and friends -> git_transfer_progress* Also made git_transfer_progress members more sanely named.
Ben Straub 7635a118 2012-10-17T14:06:32 Fix example compilation
Ben Straub d57c47dc 2012-10-16T13:29:12 Add accessor for git_remote's stats field Also converted the network example to use it.
Carlos Martín Nieto 0a1db746 2012-05-14T20:46:30 examples: add progress output to fetch
Carlos Martín Nieto bffa852f 2012-07-13T12:01:11 indexer: recognize and mark when all of the packfile has been downloaded We can't always rely on the network telling us when the download is finished. Recognize it from the indexer itself.
Carlos Martín Nieto ae789622 2012-07-25T10:52:20 examples: fix warnings in network/
Carlos Martín Nieto 64d01de8 2012-07-24T14:23:16 remote: start moving the protocol to a common area 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.
Carlos Martín Nieto b3aaa7a7 2012-07-21T17:52:51 Add a struct for network callbacks Currently only update_tips is used, but it prepares the way for progress output during download.
Chris Young a8df98c6 2012-06-14T18:57:24 Updates from comments on OS4 compatibility pull request http://github.com/libgit2/libgit2/pull/766
Chris Young 5c0fd7b9 2012-06-09T13:20:07 allow disabling pthreads for testing
Carlos Martín Nieto 7eeec8f2 2012-05-24T16:41:53 examples/network: consistently use tabs for indentation
Carlos Martín Nieto baaa8a44 2012-05-03T20:25:56 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.
Michael Schubert 42ea35c0 2012-05-01T22:25:43 remote: don't free transport on disconnect 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().
Carlos Martín Nieto f184836b 2012-04-25T12:13:20 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.
Carlos Martín Nieto bf4ef0c5 2012-04-16T05:02:41 examples: run fetch in a background thread This allows us to give updates on how it's doing
Carlos Martín Nieto db0f96a6 2012-04-13T23:37:55 examples: port 'fetch' to the new API
Vicent Marti d88d4311 2011-11-28T08:40:40 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.
Brandon Casey faeebd06 2011-11-06T19:35:35 examples/network/fetch.c: revert overzealous conversion of free to git__free Since git__free is not exported (it's actually a macro), it should not be used in client programs. Change this call to 'git__free' back to 'free'.
Vicent Marti 3286c408 2011-10-28T14:51:13 global: Properly use `git__` memory wrappers Ensure that all memory related functions (malloc, calloc, strdup, free, etc) are using their respective `git__` wrappers.
Carlos Martín Nieto 24012627 2011-10-03T00:33:13 examples: add ls-remote, fetch and index-pack examples Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>