examples/clone.c


Log

Author Commit Date CI Message
Scott Furry 73a186f2 2019-06-27T10:02:40 Adjust printf specifiers in examples code Static analysis of example code found multiple findings of `printf` usage where filling value is members of git_indexer_progress object. Specifier used was for signed int but git_indexer_progress members are typed as unsigned ints. `printf` specifiers were altered to match type.
Patrick Steinhardt abf24a30 2019-06-27T15:25:17 examples: avoid conversion warnings when calculating progress When computing the progress, we perform some arithmetics that are implicitly converting from `size_t` to `int`. In one case we're calclulating a percentage, so we know that it should always be in the range of [0,100] and thus we're fine. In the other case we convert from bytes to kilobytes -- this should be stored in a `size_t` to avoid loss of precision, even though it probably won't matter due to limited download rates.
Edward Thomson a1ef995d 2019-02-21T10:33:30 indexer: use git_indexer_progress throughout Update internal usage of `git_transfer_progress` to `git_indexer_progreses`.
Patrick Steinhardt ead10785 2019-01-24T11:31:49 examples: create common lg2 executable 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.