summaryrefslogtreecommitdiff
path: root/examples/log.c
Commit message (Collapse)AuthorAgeFilesLines
* examples: create common lg2 executablePatrick Steinhardt2019-02-151-13/+2
| | | | | | | | | | | | | | | | | | 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.
* object_type: convert final internal users to new namesethomson/git_objEdward Thomson2019-01-171-1/+1
| | | | | Update some missed types that were continuing to use the old `GIT_OBJ` names.
* examples: log: pass options pointer to print_commitCarson Howard2017-10-131-7/+7
| | | Cleaned up the PR to address styling issues.
* example-log: add support for --log-sizeCarson Howard2017-10-111-4/+11
|
* Rename git_threads_ to git_libgit2_Carlos Martín Nieto2014-11-081-2/+2
| | | | | | This describes their purpose better, as we now initialize ssl and some other global stuff in there. Calling the init function is not something which has been optional for a while now.
* examples/log.c: invert filtering impl and conditionalEoin Coffey2014-05-281-14/+14
|
* Add support for --grepEoin Coffey2014-05-231-1/+23
|
* Add --committer option, and break out helper functionEoin Coffey2014-05-231-7/+21
|
* Add support for --author flag in example log implementationEoin Coffey2014-05-221-1/+10
|
* Replace copyright topmatter in example filesBen Straub2013-11-021-3/+10
|
* Merge pull request #1916 from libgit2/simplify-examplesVicent Martí2013-11-011-232/+249
|\ | | | | Fix examples to make the important stuff more obvious
| * Format comments for use with doccoBen Straub2013-10-311-26/+29
| |
| * Extract common example helpers and reorg examplesRussell Belfer2013-10-291-227/+241
| | | | | | | | | | | | | | | | | | This reorganizes a few of the examples so that the main function comes first with the argument parsing extracted into a helper that can come at the end of the file (so the example focuses more on the use of libgit2 instead of command line support). This also creates a shared examples/common.[ch] so that useful helper funcs can be shared across examples instead of repeated.
* | Use gmtime() instead of gmtime_t()Linquize2013-10-311-3/+3
|/ | | | The latter is not available on Windows
* Create git_diff_line and extend git_diff_hunkRussell Belfer2013-10-211-6/+10
| | | | | | | | | | | | | Instead of having functions with so very many parameters to pass hunk and line data, this takes the existing git_diff_hunk struct and extends it with more hunk data, plus adds a git_diff_line. Those structs are used to pass back hunk and line data instead of the old APIs that took tons of parameters. Some work that was previously only being done for git_diff_patch creation (scanning the diff content for exact line counts) is now done for all callbacks, but the performance difference should not be noticable.
* Diff API cleanupRussell Belfer2013-10-151-1/+1
| | | | | | | | This lays groundwork for separating formatting options from diff creation options. This groups the formatting flags separately from the diff list creation flags and reorders the options. This also tweaks some APIs to further separate code that uses patches from code that just looks at git_diffs.
* Rename diff objects and split patch.hRussell Belfer2013-10-111-5/+5
| | | | | | This makes no functional change to diff but renames a couple of the objects and splits the new git_patch (formerly git_diff_patch) into a new header file.
* Fix -n bug; default to all ancestorsBrendan Macmillan2013-07-271-3/+4
|
* Add a bunch more features to log exampleRussell Belfer2013-07-101-14/+112
|
* Fix example/log.c pathspec handling of mergesRussell Belfer2013-07-101-32/+92
| | | | | | | This fixes the way the example log program decides if a merge commit should be shown when a pathspec is given. Also makes it easier to use the pathspec API to just check "does a tree match anything in the pathspec" without allocating a match list.
* more examples/log.c bug fixingRussell Belfer2013-07-101-4/+4
|
* fix bug with order args and no revisionRussell Belfer2013-07-101-2/+5
|
* Fix example/log.c minor diffs with git logRussell Belfer2013-07-101-2/+5
|
* Add basic commit formatting to log outputRussell Belfer2013-07-101-3/+55
|
* More progress on log exampleRussell Belfer2013-07-101-62/+146
|
* Extending log example codeRussell Belfer2013-07-101-3/+50
| | | | | | | | | This adds more command line processing to the example version of log. In particular, this adds the funky command line processing that allows an arbitrary series of revisions followed by an arbitrary number of paths and/or glob patterns. The actual logging part still isn't implemented.
* Basic framework for log commandRussell Belfer2013-07-101-0/+58