examples/network


Log

Author Commit Date CI Message
Edward Thomson d202bb7d 2015-06-29T21:48:35 examples: clean up some warnings
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 cf66c474 2015-05-06T12:26:05 examples: show the sideband progress on clone This lets us see what the server (or libgit2 locally) is doing, rather than having to stare at a non-moving screen.
Carlos Martín Nieto 3fec548a 2015-04-23T06:01:13 examples: adjust to the new remote API
Tomas Paladin Volf 785990be 2015-05-02T12:16:22 Restructured to be nicer example Code restructured to better represent best practice when using libgit2.
Tomas Paladin Volf 9bff15f4 2015-04-30T15:10:28 Added call to git_libgit2_shutdown() Added forgotten call to git_libgit2_shutdown() to the /examples/network/git2.c.
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.
Edward Thomson 14fec0ae 2015-02-14T12:10:00 example: drop `SAFE_CREATE` from clone example
Edward Thomson 9af3c416 2015-01-10T18:05:01 clone example: don't divide by zero Local transports don't have data about the size, avoid dividing by zero in the callback.
Carlos Martín Nieto 799e22ea 2014-10-23T17:34:41 Rename git_threads_ to git_libgit2_ This describes their purpose better, as we now initialize ssl and some other global stuff in there. Calling the init function is not something which has been optional for a while now.
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 6affd71f 2014-01-03T17:38:34 git_checkout_opts -> git_checkout_options
Miha 300f4412 2014-02-25T11:56:11 - BUGFIX #2133 (@fourplusone) in smart_protocol.c - added MSVC cmake definitions to disable warnings - general.c is rewritten so it is ansi-c compatible and compiles ok on microsoft windows - some MSVC reported warning fixes
Ben Straub 5c8be325 2014-02-05T13:32:45 Fix a few references to changed function signatures
Vicent Martí 6414fd33 2013-11-11T06:47:15 Merge pull request #1956 from libgit2/cmn/fetch-default-head Remote revamp (director's cut)
Carlos Martín Nieto 359dce72 2013-11-02T00:05:32 remote: make _ls return the list directly The callback-based method of listing remote references dates back to the beginning of the network code's lifetime, when we didn't know any better. We need to keep the list around for update_tips() after disconnect() so let's make use of this to simply give the user a pointer to the array so they can write straightforward code instead of having to go through a callback.
Edward Thomson ad62f2ee 2013-11-07T12:00:43 update example to new packfile creation signature
Ben Straub ea8ce3d1 2013-11-04T15:50:33 Fix warnings
Vicent Martí 567649f2 2013-11-01T09:38:34 Merge pull request #1916 from libgit2/simplify-examples Fix examples to make the important stuff more obvious
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.
Carlos Martín Nieto a6154f21 2013-10-30T15:00:05 indexer: remove the stream infix It was there to keep it apart from the one which read in from a file on disk. This other indexer does not exist anymore, so there is no need for anything other than git_indexer to refer to it. While here, rename _add() function to _append() and _finalize() to _commit(). The former change is cosmetic, while the latter avoids talking about "finalizing", which OO languages use to mean something completely different.
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 0b33fca0 2013-10-02T13:39:35 indexer: fix thin packs When given an ODB from which to read objects, the indexer will attempt to inject the missing bases at the end of the pack and update the header and trailer to reflect the new contents.
Carlos Martín Nieto 0e0cf787 2013-10-02T14:04:44 clone: put the callbacks struct directly in the clone options There's no need for this to be a pointer to somewhere else.
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.
Krzysztof Adamski d6d52348 2013-09-01T18:30:11 Removing unneeded code duplication in ls-remote.c
Carlos Martín Nieto 6c1b6b7a 2013-04-23T16:21:47 examples: init the threading system
Russell Belfer 9da187e8 2013-04-09T11:40:00 Fix clang warnings and improve checks
lionel vitte e2886f1e 2013-03-20T21:13:43 Fix link issue in network examples
Martin Woodward 5c46937b 2013-02-26T09:00:37 Give props to Martin Pool Martin Pool was the original author of the code referenced in the clone example. Make note that he's given his permission and also give him the proper credit.
Ben Straub fe95ac1b 2013-02-05T10:59:58 Allow progress callback to cancel fetch This works by having the indexer watch the return code of the callback, so will only take effect on object boundaries.
Ben Straub 7602cb7c 2013-01-31T10:44:57 Add user-from-url param to auth callback
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 730df6d0 2013-01-02T13:43:54 Include checkout options inline
Ben Straub 0642c143 2013-01-02T12:44:47 Move `url` to last place in parameter list
Ben Straub 3de22567 2012-12-27T11:12:14 Fix warnings in example
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 316bca69 2012-12-19T17:07:12 Fix clone sample
Ben Straub cc3e9b5a 2012-12-16T10:50:10 Make building samples more friendly
Ben Straub b9e7e2b4 2012-12-14T13:46:45 Move non-options back out of options struct
Ben Straub 0015b587 2012-12-14T13:18:06 Deploy git_clone_options to network sample
Ben Straub 2b10a2b0 2012-12-13T11:47:14 Enable authenticated clones in network sample
Ben Straub 24393ea6 2012-12-13T09:14:56 Stop premature remote freeing when cloning
Ben Straub 34c8c754 2012-12-13T08:54:23 Fix network example
Ben Straub 9267ff58 2012-11-29T20:01:24 Deploy GIT_REMOTE_CALLBACKS_INIT
Ben Straub b81aa2f1 2012-11-29T14:06:40 Deploy GIT_CHECKOUT_OPTS_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).
Ben Straub 3f63cc9e 2012-11-18T22:20:47 Examples: fix clone api
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 2dae54a9 2012-10-19T20:24:15 Improve clone sample's formatting
Ben Straub 9c05c17b 2012-10-19T20:05:18 Checkout progress now reports completed/total steps
Ben Straub 7bcd9e23 2012-10-19T19:23:32 gitno_buffer: callback on each packet The fetch code takes advantage of this to implement a progress callback every 100kb of transfer.
Ben Straub 45b60d7b 2012-10-18T15:17:12 Correct progress reporting from checkout
Ben Straub aa1e8674 2012-10-18T12:57:47 Clone: in-line callbacks for progress Also implemented in the git2 example.
Ben Straub 7635a118 2012-10-17T14:06:32 Fix example compilation
Ben Straub 2b7efe03 2012-10-17T10:15:51 Example: compile fixes (not yet working)
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.
Vicent Martí f98c32f3 2012-08-19T01:26:06 Merge pull request #778 from ben/clone Clone
Ben Straub 383fb799 2012-07-31T08:51:38 Rename example function to avoid name collision.
Ben Straub 7e02c7c5 2012-07-31T08:45:42 Checkout: save index on checkout.
Ben Straub 84595a30 2012-07-30T14:38:32 Add clone to the network example.
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.
Carlos Martín Nieto 37159957 2012-06-28T09:33:08 indexer: don't use '/objects/pack/' unconditionally Not everyone who indexes a packfile wants to put it in the standard git repository location.
Chris Young 66a8b662 2012-06-14T19:15:46 Fix incorrect revert
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 41cbbea8 2012-06-09T23:03:27 Let platform 'Generic' get the regex deps so we don't need to use our external ones
Chris Young 5c0fd7b9 2012-06-09T13:20:07 allow disabling pthreads for testing
Chris Young bb502fa8 2012-06-09T12:52:49 Fix makefile
Carlos Martín Nieto 7eeec8f2 2012-05-24T16:41:53 examples/network: consistently use tabs for indentation
Vicent Martí e172cf08 2012-05-18T01:21:06 errors: Rename the generic return codes
Carlos Martín Nieto 41178b41 2012-05-11T21:49:33 examples: fix an oopsie
Carlos Martín Nieto fb49bdf9 2012-05-10T16:52:12 examples: update network examples error handling Use giterr_last() and make sure it's not NULL.
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
Carlos Martín Nieto 907ebe85 2012-04-13T10:29:27 examples: stream indexer example
Carlos Martín Nieto fc1cc205 2012-03-26T11:36:12 Use new error handling in the example network code
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 0b142c9c 2011-11-06T20:07:27 examples/network/.gitignore: ignore 'git2'
Brandon Casey 349532d0 2011-11-06T19:44:29 examples/network/git2.c: exit with proper status, and avoid segfault This function should exit after printing usage information if too few arguments were specified. Additionally, it should exit with a failure status if the first argument supplied is not one in the internal command list.