summaryrefslogtreecommitdiff
path: root/examples/merge.c
Commit message (Collapse)AuthorAgeFilesLines
* examples: normalize decls and usage of options structsEtienne Samson2019-11-061-8/+8
|
* global: DRY includes of assert.hEtienne Samson2019-11-061-1/+0
|
* Merge pull request #5143 from libgit2/ethomson/warningsPatrick Steinhardt2019-07-051-2/+2
|\ | | | | ci: build with ENABLE_WERROR on Windows
| * examples: cast away constness for reallocating head arraysPatrick Steinhardt2019-07-051-1/+1
| | | | | | | | | | | | | | | | | | When reallocating commit arrays in `opts_add_commit` and `opts_add_refish`, respectively, we simply pass the const pointer to `xrealloc`. As `xrealloc` expects a non-const pointer, though, this will generate a warning with some compilers. Cast away the constness to silence compilers.
| * examples: cast away const-nessEdward Thomson2019-06-251-2/+2
| |
* | Resolve static check warnings in example codeScott Furry2019-06-271-0/+1
|/ | | | | | | | | | | | Using cppcheck on libgit2 sources indicated two warnings in example code. merge.c was reported as having a memory leak. Fix applied was to `free()` memory pointed to by `parents`. init.c was reported as having a null pointer dereference on variable arg. Function 'usage' was being called with a null variable. Changed supplied parameter to empty string.
* examples: move MSVC compatibility macros into common headerPatrick Steinhardt2019-04-161-4/+0
| | | | | | | We currently have two locations in our examples where we define the same compatibility wrappers for MSVC. Move them into "common.h" to avoid duplication and make them available to other examples.
* examples: create common lg2 executablePatrick Steinhardt2019-02-151-9/+1
| | | | | | | | | | | | | | | | | | 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.
* errors: remove giterr usage in examplesEdward Thomson2019-01-221-2/+2
|
* object_type: convert final internal users to new namesethomson/git_objEdward Thomson2019-01-171-2/+2
| | | | | Update some missed types that were continuing to use the old `GIT_OBJ` names.
* examples: move refish resolution function in commonEtienne Samson2018-07-071-23/+0
|
* examples: zero out our options memory before useEtienne Samson2018-01-251-0/+2
|
* examples: our/their can be NULLEtienne Samson2018-01-251-2/+4
|
* examples: fix remaining review commentsEtienne Samson2018-01-251-0/+2
|
* examples: move support code into static functionsEtienne Samson2018-01-251-81/+97
|
* examples: hoist the merge analysis back into mainEtienne Samson2018-01-251-58/+39
|
* examples: minor review fixupsEtienne Samson2018-01-251-10/+12
|
* examples: add mergeEtienne Samson2018-01-251-0/+391