summaryrefslogtreecommitdiff
path: root/examples/network
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* examples: clean up some warningsEdward Thomson2015-06-291-0/+2
|
* remote: remove fetch parameter from create_anonymousCarlos Martín Nieto2015-05-282-2/+2
| | | | | | An anonymous remote is not configured and cannot therefore have configured refspecs. Remove the parameter which adds this from the constructor.
* examples: show the sideband progress on cloneCarlos Martín Nieto2015-05-131-0/+8
| | | | | This lets us see what the server (or libgit2 locally) is doing, rather than having to stare at a non-moving screen.
* examples: adjust to the new remote APICarlos Martín Nieto2015-05-133-13/+13
|
* Restructured to be nicer exampleTomas Paladin Volf2015-05-021-9/+14
| | | | | Code restructured to better represent best practice when using libgit2.
* Added call to git_libgit2_shutdown()Tomas Paladin Volf2015-04-301-2/+4
| | | Added forgotten call to git_libgit2_shutdown() to the /examples/network/git2.c.
* 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.
* example: drop `SAFE_CREATE` from clone exampleEdward Thomson2015-02-271-1/+1
|
* clone example: don't divide by zeroEdward Thomson2015-01-101-3/+9
| | | | | Local transports don't have data about the size, avoid dividing by zero in the callback.
* Rename git_threads_ to git_libgit2_Carlos Martín Nieto2014-11-081-1/+1
| | | | | | 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.
* remote: rename _load() to _lookup()cmn/remote-lookupCarlos Martín Nieto2014-11-082-2/+2
| | | | 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-012-2/+2
| | | | | | | | | | 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.
* git_checkout_opts -> git_checkout_optionsBen Straub2014-03-061-1/+1
|
* - BUGFIX #2133 (@fourplusone) in smart_protocol.cMiha2014-02-251-1/+1
| | | | | | - 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
* Fix a few references to changed function signaturesBen Straub2014-02-051-1/+1
|
* Merge pull request #1956 from libgit2/cmn/fetch-default-headVicent Martí2013-11-111-12/+14
|\ | | | | Remote revamp (director's cut)
| * remote: make _ls return the list directlyCarlos Martín Nieto2013-11-111-12/+14
| | | | | | | | | | | | | | | | | | | | | | 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.
* | update example to new packfile creation signatureEdward Thomson2013-11-071-1/+1
| |
* | Fix warningsBen Straub2013-11-041-2/+2
|/
* Merge pull request #1916 from libgit2/simplify-examplesVicent Martí2013-11-012-3/+17
|\ | | | | Fix examples to make the important stuff more obvious
| * Fix typosBen Straub2013-11-011-2/+2
| |
| * A few formatting changes for roccoCarlos Martín Nieto2013-11-012-3/+17
| | | | | | | | | | I'm not too happy about manually inserting < and > but those get output as html tags otherwise.
* | indexer: remove the stream infixCarlos Martín Nieto2013-10-301-6/+6
|/ | | | | | | | | | | 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.
* Merge pull request #1891 from libgit2/cmn/fix-thin-packsVicent Martí2013-10-283-4/+20
|\ | | | | Add support for thin packs
| * indexer: include the delta statsCarlos Martín Nieto2013-10-232-2/+13
| | | | | | | | | | | | | | | | | | | | 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.
| * indexer: fix thin packsCarlos Martín Nieto2013-10-041-1/+1
| | | | | | | | | | | | 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.
* | clone: put the callbacks struct directly in the clone optionsCarlos Martín Nieto2013-10-021-5/+3
| | | | | | | | There's no need for this to be a pointer to somewhere else.
* | remote: move the credentials callback to the structCarlos Martín Nieto2013-10-023-3/+5
| | | | | | | | | | 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-022-3/+5
|/ | | | | | 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-016-33/+45
|
* Removing unneeded code duplication in ls-remote.cKrzysztof Adamski2013-09-011-33/+7
|
* examples: init the threading systemCarlos Martín Nieto2013-04-231-0/+2
|
* Fix clang warnings and improve checksRussell Belfer2013-04-093-8/+17
|
* Fix link issue in network exampleslionel vitte2013-03-201-2/+3
|
* Give props to Martin PoolMartin Woodward2013-02-261-1/+4
| | | | | | 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.
* Allow progress callback to cancel fetchBen Straub2013-02-051-1/+2
| | | | | This works by having the indexer watch the return code of the callback, so will only take effect on object boundaries.
* Add user-from-url param to auth callbackBen Straub2013-01-311-0/+1
|
* update examples to work on windowsEdward Thomson2013-01-233-8/+31
|
* 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.
* Include checkout options inlineBen Straub2013-01-021-1/+1
|
* Move `url` to last place in parameter listBen Straub2013-01-022-2/+2
|
* Fix warnings in exampleBen Straub2012-12-271-3/+15
|
* Fix examplesBen Straub2012-12-212-2/+2
|
* Rename remote creation APIsBen Straub2012-12-202-2/+2
| | | | git_remote_add -> git_remote_create git_remote_new -> git_remote_create_inmemory
* Fix clone sampleBen Straub2012-12-191-17/+6
|