summaryrefslogtreecommitdiff
path: root/examples/index-pack.c
Commit message (Collapse)AuthorAgeFilesLines
* object: lookup sha256 objectsEdward Thomson2023-02-121-1/+8
| | | | | This is much of the plumbing for the object database to support SHA256, and for objects to be able to parse SHA256 versions of themselves.
* indexer: use a byte array for checksumEdward Thomson2022-01-271-3/+1
| | | | | | | | The index's checksum is not an object ID, so we should not use the `git_oid` type. Use a byte array for checksum calculation and storage. Deprecate the `git_indexer_hash` function. Callers should use the new `git_indexer_name` function which provides a unique packfile name.
* Adjust printf specifiers in examples codeScott Furry2019-08-011-2/+2
| | | | | | | 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.
* examples: consolidate includes into "common.h"Patrick Steinhardt2019-07-051-16/+0
| | | | | Consolidate all standard includes and defines into "common.h". This lets us avoid having to handle platform-specific things in multiple places.
* examples: ssize_t is signed, not unsignedEdward Thomson2019-06-251-1/+1
|
* indexer: use git_indexer_progress throughoutEdward Thomson2019-02-221-2/+2
| | | | | Update internal usage of `git_transfer_progress` to `git_indexer_progreses`.
* examples: create common lg2 executablePatrick Steinhardt2019-02-151-0/+87
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.