summaryrefslogtreecommitdiff
path: root/examples/network/clone.c
Commit message (Collapse)AuthorAgeFilesLines
* examples: create common lg2 executablePatrick Steinhardt2019-02-151-104/+0
| | | | | | | | | | | | | | | | | | Inside of our networking example code, we have a git2 executable that acts as an entry point to all the different network examples. As such, it is kind of the same like the normal git(1) executable in that it simply arbitrates to the respective subcommands. Let's extend this approach and merge all examples into a single standalone lg2 executable. Instead of building an executable for all the existing examples we have, we now bundle them all inside of the lg2 one and let them be callable via subcommands. In the process, we can get rid of duplicated library initialization, deinitialization and repository discovery code. Instead of having each subcommand handle these on its own, we simply do it inside of the single main function now.
* examples: merge common network codePatrick Steinhardt2019-02-151-10/+1
| | | | | | | | | | | | Right now, we have two sets of "common" code, one containing general common code and one containing network common code. As we intend to get rid of the network subdirectory and instead merge all examples into a single standalone executable, this distinction doesn't make a lot of sense now. Furthermore, the common network code is not that big. Let's get rid of the common network code by merging it into the general common code.
* errors: remove giterr usage in examplesEdward Thomson2019-01-221-1/+1
|
* treewide: remove use of C++ style commentsPatrick Steinhardt2018-07-131-5/+5
| | | | | | | | | C++ style comment ("//") are not specified by the ISO C90 standard and thus do not conform to it. While libgit2 aims to conform to C90, we did not enforce it until now, which is why quite a lot of these non-conforming comments have snuck into our codebase. Do a tree-wide conversion of all C++ style comments to the supported C style comments to allow us enforcing strict C90 compliance in a later commit.
* fix examples/network/clone.c: heap-buffer-overflowForce.Charlie-I2017-01-091-1/+1
| | | Format of a length of string to the correct format is:%.*s
* examples: clean up some warningsEdward Thomson2015-06-291-0/+2
|
* 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-131-3/+3
|
* 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.
* 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
* Merge pull request #1891 from libgit2/cmn/fix-thin-packsVicent Martí2013-10-281-1/+7
|\ | | | | Add support for thin packs
| * indexer: include the delta statsCarlos Martín Nieto2013-10-231-1/+7
| | | | | | | | | | | | | | | | | | | | 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.
* | 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-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-2/+4
|/ | | | | | 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-32/+1
|
* 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-231-3/+5
|
* Include checkout options inlineBen Straub2013-01-021-1/+1
|
* Fix warnings in exampleBen Straub2012-12-271-3/+15
|
* Fix clone sampleBen Straub2012-12-191-17/+6
|
* Move non-options back out of options structBen Straub2012-12-141-6/+5
|
* Deploy git_clone_options to network sampleBen Straub2012-12-141-5/+10
|
* Enable authenticated clones in network sampleBen Straub2012-12-131-1/+17
|
* Stop premature remote freeing when cloningBen Straub2012-12-131-0/+1
|
* Fix network exampleBen Straub2012-12-131-2/+11
|
* Deploy GIT_CHECKOUT_OPTS_INITBen Straub2012-11-301-1/+1
|
* Examples: fix clone apiBen Straub2012-11-271-1/+1
|
* Fix various cross-platform build issuesRussell Belfer2012-11-091-9/+15
| | | | | | 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.
* Renaming: fix exampleBen Straub2012-10-241-7/+8
|
* Improve clone sample's formattingBen Straub2012-10-191-9/+6
|
* Checkout progress now reports completed/total stepsBen Straub2012-10-191-4/+8
|
* gitno_buffer: callback on each packetBen Straub2012-10-191-3/+4
| | | | | The fetch code takes advantage of this to implement a progress callback every 100kb of transfer.
* Correct progress reporting from checkoutBen Straub2012-10-191-3/+3
|
* Clone: in-line callbacks for progressBen Straub2012-10-191-42/+50
| | | | Also implemented in the git2 example.
* Example: compile fixes (not yet working)Ben Straub2012-10-191-3/+2
|
* Rename example function to avoid name collision.Ben Straub2012-07-311-1/+1
|
* Checkout: save index on checkout.Ben Straub2012-07-311-1/+0
|
* Add clone to the network example.Ben Straub2012-07-301-0/+69