Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | examples: network: fix Win32 linking errors due to getline | Patrick Steinhardt | 2017-11-06 | 1 | -2/+39 |
| | | | | | | | | | | | | The getline(3) function call is not part of ISO C and, most importantly, it is not implemented on Microsoft Windows platforms. As our networking example code makes use of getline, this breaks builds on MSVC and MinGW. As this code wasn't built prior to the previous commit, this was never noticed. Fix the error by instead implementing a `readline` function, which simply reads the password from stdin until it reads a newline character. | ||||
* | Merge pull request #4373 from cjhoward92/examples/log-show-log-size | Carlos Martín Nieto | 2017-10-29 | 1 | -3/+10 |
|\ | | | | | example-log: add support for --log-size | ||||
| * | examples: log: pass options pointer to print_commit | Carson Howard | 2017-10-13 | 1 | -7/+7 |
| | | | | | | Cleaned up the PR to address styling issues. | ||||
| * | example-log: add support for --log-size | Carson Howard | 2017-10-11 | 1 | -4/+11 |
| | | |||||
* | | examples: remove Makefile | Patrick Steinhardt | 2017-10-20 | 2 | -32/+0 |
|/ | | | | | | | | | | Back in the days when libgit2 was still young, libgit2 was using plain Makefiles as build infrastructure. We later changed that to instead use the CMake build system to make cross-platform development easier. In the process, we forgot to remove the Makefile from our examples directory, which is fixed by this commit here. Furthermore, remove the accompanying .gitignore file, which ignores build outputs. As we do out-of-tree builds only nowadays, no output is generated in that directory anymore. | ||||
* | Fix Issue #4047 Check return codes and free objectsexample_general | Douglas Swanson | 2017-10-07 | 1 | -3/+28 |
| | |||||
* | cmake: keep track of libraries and includes via lists | Patrick Steinhardt | 2017-08-16 | 1 | -0/+3 |
| | | | | | | | | | | | | | | Later on, we will move detection of required libraries, library directories as well as include directories into a separate CMakeLists.txt file inside of the source directory. Obviously, we want to avoid duplication here regarding these parameters. To prepare for the split, put the parameters into three variables LIBGIT2_LIBS, LIBGIT2_LIBDIRS and LIBGIT2_INCLUDES, tracking the required libraries, linking directory as well as include directories. These variables can later be exported into the parent scope from inside of the source build instructions, making them readily available for the other subdirectories. | ||||
* | examples: network: refactor credentials callback | Patrick Steinhardt | 2017-05-15 | 1 | -5/+19 |
| | | | | | | | | The credentials callback reads the username and password via scanf into fixed-length arrays. While these are simply examples and as such not as interesting, the unchecked return value of scanf causes GCC to emit warnings. So while we're busy to shut up GCC, we also fix the possible overflow of scanf by using getline instead. | ||||
* | examples: general: fix memory leaks | Patrick Steinhardt | 2017-01-12 | 1 | -1/+30 |
| | |||||
* | examples: general: display config only if it was found | Patrick Steinhardt | 2017-01-12 | 1 | -3/+3 |
| | |||||
* | examples: general: narrow down scope of loop variables | Patrick Steinhardt | 2017-01-12 | 1 | -4/+6 |
| | |||||
* | examples: general: clean up committer/author variables | Patrick Steinhardt | 2017-01-12 | 1 | -4/+4 |
| | |||||
* | fix examples/network/clone.c: heap-buffer-overflow | Force.Charlie-I | 2017-01-09 | 1 | -1/+1 |
| | | | Format of a length of string to the correct format is:%.*s | ||||
* | Fix issue #4046 Seg fault in config_files() | Douglas Swanson | 2016-12-29 | 1 | -4/+6 |
| | |||||
* | examples: add: fix type casting warning | Patrick Steinhardt | 2016-10-10 | 1 | -5/+4 |
| | |||||
* | examples: diff: parse correct types for line-diffopts | Patrick Steinhardt | 2016-10-10 | 3 | -3/+31 |
| | |||||
* | examples: fix warnings in network/fetch.c | Patrick Steinhardt | 2016-10-10 | 1 | -7/+7 |
| | |||||
* | examples: general: fix remaining warnings | Patrick Steinhardt | 2016-10-10 | 1 | -9/+14 |
| | |||||
* | examples: general: convert C99 comments to C90 comments | Patrick Steinhardt | 2016-10-10 | 1 | -42/+54 |
| | |||||
* | examples: general: extract function demonstrating OID parsing | Patrick Steinhardt | 2016-10-10 | 1 | -26/+44 |
| | |||||
* | examples: general: extract function demonstrating ODB | Patrick Steinhardt | 2016-10-10 | 1 | -51/+77 |
| | |||||
* | examples: general: extract function demonstrating commit writing | Patrick Steinhardt | 2016-10-10 | 1 | -36/+51 |
| | |||||
* | examples: general: extract functions demonstrating object parsing | Patrick Steinhardt | 2016-10-10 | 1 | -131/+194 |
| | |||||
* | examples: general: extract function demonstrating revwalking | Patrick Steinhardt | 2016-10-10 | 1 | -39/+53 |
| | |||||
* | examples: general: extract function demonstrating index walking | Patrick Steinhardt | 2016-10-10 | 1 | -24/+33 |
| | |||||
* | examples: general: extract function demonstrating reference listings | Patrick Steinhardt | 2016-10-10 | 1 | -22/+36 |
| | |||||
* | examples: general: extract function demonstrating config files | Patrick Steinhardt | 2016-10-10 | 1 | -14/+23 |
| | |||||
* | examples: general: use tabs instead of spaces | Patrick Steinhardt | 2016-10-10 | 1 | -457/+457 |
| | |||||
* | proxy: ask the user for credentials if necessary | Carlos Martín Nieto | 2016-04-19 | 1 | -1/+1 |
| | |||||
* | Update link to Pro Git's Git internals chapter. | Patrick McKenna | 2016-03-07 | 1 | -3/+2 |
| | |||||
* | fix return | Eun | 2015-10-07 | 1 | -0/+1 |
| | |||||
* | Update another call to git_remote_connect | Matt Burke | 2015-09-08 | 1 | -1/+1 |
| | |||||
* | Merge pull request #3306 from libgit2/cmn/fetch-ex-fetch | Carlos Martín Nieto | 2015-07-13 | 1 | -74/+27 |
|\ | | | | | examples: modernise the fetch example | ||||
| * | examples: modernise the fetch examplecmn/fetch-ex-fetch | Carlos Martín Nieto | 2015-07-12 | 1 | -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. | ||||
* | | Fix #3094 - improve use of portable size_t/ssize_t format specifiers. | Matthew Plough | 2015-07-12 | 1 | -2/+2 |
|/ | | | | The header src/cc-compat.h defines portable format specifiers PRIuZ, PRIdZ, and PRIxZ. The original report highlighted the need to use these specifiers in examples/network/fetch.c. For this commit, I checked all C source and header files not in deps/ and transitioned to the appropriate format specifier where appropriate. | ||||
* | examples: clean up some warnings | Edward Thomson | 2015-06-29 | 2 | -2/+4 |
| | |||||
* | Rename FALLBACK to UNSPECIFIEDcmn/rename-unspecified | Carlos Martín Nieto | 2015-06-25 | 1 | -1/+1 |
| | | | | | Fallback describes the mechanism, while unspecified explains what the user is thinking. | ||||
* | examples: adjust to submodule status API change | Carlos Martín Nieto | 2015-06-22 | 1 | -16/+10 |
| | |||||
* | print_usage functions is defined but not used | Ariel O. Barria | 2015-06-03 | 1 | -0/+2 |
| | | | | | | Use the previously created function to display a message when the arguments are not valid. ticket 3095 | ||||
* | remote: remove fetch parameter from create_anonymous | Carlos Martín Nieto | 2015-05-28 | 2 | -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 clone | Carlos Martín Nieto | 2015-05-13 | 1 | -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 API | Carlos Martín Nieto | 2015-05-13 | 4 | -24/+16 |
| | |||||
* | Restructured to be nicer example | Tomas Paladin Volf | 2015-05-02 | 1 | -9/+14 |
| | | | | | Code restructured to better represent best practice when using libgit2. | ||||
* | Added call to git_libgit2_shutdown() | Tomas Paladin Volf | 2015-04-30 | 1 | -2/+4 |
| | | | Added forgotten call to git_libgit2_shutdown() to the /examples/network/git2.c. | ||||
* | describe example: enable building by default. | Patrick Steinhardt | 2015-04-07 | 2 | -0/+2 |
| | |||||
* | examples: add remote example. | Patrick Steinhardt | 2015-03-19 | 3 | -1/+279 |
| | |||||
* | Merge pull request #2808 from libgit2/cmn/repo-ident | Edward Thomson | 2015-03-03 | 1 | -1/+1 |
|\ | | | | | Remove the signature from ref-modifying functions | ||||
| * | Remove the signature from ref-modifying functions | Carlos Martín Nieto | 2015-03-03 | 1 | -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. | ||||
* | | Merge pull request #2885 from JIghtuse/master | Carlos Martín Nieto | 2015-03-03 | 1 | -6/+24 |
|\ \ | |/ |/| | describe example: function to add commits to opts | ||||
| * | describe example: function to add commits to opts | Boris Egorov | 2015-02-06 | 1 | -6/+24 |
| | | | | | | | | | | | | | | Add safe function to (a,rea)llocate memory which terminate example on memory allocation failure. Move code to allocate commits to its own function. |