summaryrefslogtreecommitdiff
path: root/examples/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* examples: add a basic for-each-ref examplepeff/iconvJeff King2014-05-081-0/+1
| | | | | | | | | | | | | This is quite close to running "git for-each-ref" except: 1. It does not take any formatting or selection options at all. 2. The output is not sorted. I wrote it to look at debugging some issues with ref iteration, but there's no reason it can't live on as an example command.
* Add tag exampleJiri Pospisil2014-03-051-1/+1
|
* Merge pull request #1317 from libgit2/blameRussell Belfer2013-11-041-1/+1
|\ | | | | Blame Canada
| * Un-remove init exampleBen Straub2013-10-091-1/+1
| |
| * Add blame exampleBen Straub2013-09-161-1/+1
| |
* | Extract common example helpers and reorg examplesRussell Belfer2013-10-291-1/+1
|/ | | | | | | | | 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.
* Add example like "git init"Russell Belfer2013-08-161-1/+1
|
* rev-parse exampleRussell Belfer2013-07-101-1/+1
|
* Basic framework for log commandRussell Belfer2013-07-101-1/+1
|
* Initial implementation of status exampleRussell Belfer2013-06-201-1/+1
|
* Add cat-file example and increase const use in APIRussell Belfer2013-05-161-1/+1
| | | | | | | | | | | | | | | | This adds an example implementation that emulates git cat-file. It is a convenient and relatively simple example of getting data out of a repository. Implementing this also revealed that there are a number of APIs that are still not using const pointers to objects that really ought to be. The main cause of this is that `git_vector_bsearch` may need to call `git_vector_sort` before doing the search, so a const pointer to the vector is not allowed. However, for tree objects, with a little care, we can ensure that the vector of tree entries is always sorted and allow lookups to take a const pointer. Also, the missing const in commit objects just looks like an oversight.
* Add rev-list example to makefilesBen Straub2013-04-091-1/+1
|
* Fix diff constructor name order confusionRussell Belfer2012-12-171-1/+1
| | | | | | | | | | | | The diff constructor functions had some confusing names, where the "old" side of the diff was coming after the "new" side. This reverses the order in the function name to make it less confusing. Specifically... * git_diff_index_to_tree becomes git_diff_tree_to_index * git_diff_workdir_to_index becomes git_diff_index_to_workdir * git_diff_workdir_to_tree becomes git_diff_tree_to_workdir
* Improve docs, examples, warningsRussell Belfer2012-11-011-1/+1
| | | | | | This improves docs in some of the public header files, cleans up and improves some of the example code, and fixes a couple of pedantic warnings in places.
* Continue implementation of git-diffRussell Belfer2012-03-021-2/+3
| | | | | | | | * Implemented git_diff_index_to_tree * Reworked git_diff_options structure to handle more options * Made most of the options in git_diff_options actually work * Reorganized code a bit to remove some redundancy * Added option parsing to examples/diff.c to test most options
* Clean up diff implementation for reviewRussell Belfer2012-03-021-3/+4
| | | | | | | This fixes several bugs, updates tests and docs, eliminates the FILE* assumption in favor of printing callbacks for the diff patch formatter helpers, and adds a "diff" example function that can perform a diff from the command line.
* Fixed typo in example Makefile code and slimmed it down more.David Boyce2011-09-151-7/+5
| | | | | | | Reverted signature of git_signature_new. Removed error check wrappers (voted down). Made Makefile work out of the box on Linux and Solaris when standard cmake build instructions for the library are followed.
* Fixed to build examples with knowledge of include and lib locations.David Boyce2011-09-121-3/+8
|
* update examples content to be compilable and up to dateScott Chacon2011-06-151-0/+10