summaryrefslogtreecommitdiff
path: root/examples/showindex.c
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Factor 40 and 41 constants from source.Ciro Santilli2014-09-161-2/+2
|
* index: rename an entry's id to 'id'Carlos Martín Nieto2014-01-251-1/+1
| | | | This was not converted when we converted the rest, so do it now.
* Merge pull request #1934 from libgit2/relicense-examplesVicent Martí2013-11-041-3/+10
|\ | | | | Relicense examples under CC0
| * Replace copyright topmatter in example filesBen Straub2013-11-021-3/+10
| |
* | Make diff and status perform soft index reloadRussell Belfer2013-11-011-1/+1
|/ | | | | | | | | | | | | | | | | | | | | This changes `git_index_read` to have two modes - a hard index reload that always resets the index to match the on-disk data (which was the old behavior) and a soft index reload that uses the timestamp / file size information and only replaces the index data if the file on disk has been modified. This then updates the git_status code to do a soft reload unless the new GIT_STATUS_OPT_NO_REFRESH flag is passed in. This also changes the behavior of the git_diff functions that use the index so that when an index is not explicitly passed in (i.e. when the functions call git_repository_index for you), they will also do a soft reload for you. This intentionally breaks the file signature of git_index_read because there has been some confusion about the behavior previously and it seems like all existing uses of the API should probably be examined to select the desired behavior.
* Clean up showindex sampleBen Straub2013-10-301-23/+15
|
* Some tests with ident and crlf filtersRussell Belfer2013-09-171-0/+4
| | | | | | | | | | | | | | Fixed the filter order to match core Git, too. This test demonstrates an interesting behavior of core Git (which is totally reasonable and which libgit2 matches, although mostly by coincidence). If you use the ident filter and commit a file with a garbage ident in it, like '$Id: this is just garbage$' and then immediately do a 'git checkout-index' with the new file, Git will not consider the file out of date and will not overwrite the file with an updated $Id$. Libgit2 has the same behavior. If you remove the file and then do a checkout-index, it will be replaced with a filtered version that has injected the OID correctly.
* Update showindex exampleRussell Belfer2012-12-281-11/+23
| | | | | | | | I find the showindex example to be pretty useful on occasion, but there were are couple of output tweaks I wanted, plus I wanted the ability to specify a path to an actual index file instead of having to open the whole repository. This makes those changes and expands the example slightly.
* Improve docs, examples, warningsRussell Belfer2012-11-011-37/+48
| | | | | | 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.
* index refactoringEdward Thomson2012-10-291-1/+2
|
* update examples content to be compilable and up to dateScott Chacon2011-06-151-2/+2
|
* add examples for docsScott Chacon2011-06-141-0/+43