Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-05-18Extend diff exampleRussell Belfer
Add --raw output format and (some) options to invoke rename/copy detection on the diff.
2013-05-16Make examples/diff.c compile vs threadsafe libraryRussell Belfer
2013-04-16Clean up minor detailsBen Straub
2013-04-15Change git_revparse to output git_object pointersBen Straub
This will probably prevent many lookup/free operations in calling code.
2013-04-09Deprecate git_revparse_single and _rangelikeBen Straub
2013-03-03Simplify diff example using revparseRussell Belfer
When the examples/diff.c was written, there was not yet a revparse API. Now we can use it to make command line parsing way better with less code. Yay!
2013-01-23Don't clear the opt instance in the diff example.Sebastian Bauer
The version field is overwritten otherwise. The opt instance is already initialized properly.
2012-12-17Fix diff constructor name order confusionRussell Belfer
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
2012-12-01Deploy GIT_DIFF_OPTIONS_INITBen Straub
2012-11-28Update diff callback param orderRussell Belfer
This makes the diff functions that take callbacks both take the payload parameter after the callback function pointers and pass the payload as the last argument to the callback function instead of the first. This should make them consistent with other callbacks across the API.
2012-11-28Examples: fix reference namesBen Straub
2012-11-15Add explicit git_index ptr to diff and checkoutRussell Belfer
A number of diff APIs and the `git_checkout_index` API take a `git_repository` object an operate on the index. This updates them to take a `git_index` pointer explicitly and only fall back on the `git_repository` index if the index input is NULL. This makes it easier to operate on a temporary index.
2012-11-02Improve docs, examples, warningsRussell Belfer
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.
2012-06-08Minor fixes, cleanups, and clarificationsRussell Belfer
There are three actual changes in this commit: 1. When the trailing newline of a file is removed in a diff, the change will now be reported with `GIT_DIFF_LINE_DEL_EOFNL` passed to the callback. Previously, the `ADD_EOFNL` constant was given which was just an error in my understanding of when the various circumstances arose. `GIT_DIFF_LINE_ADD_EOFNL` is deprecated and should never be generated. A new newline is simply an `ADD`. 2. Rewrote the `diff_delta__merge_like_cgit` function that contains the core logic of the `git_diff_merge` implementation. The new version doesn't actually have significantly different behavior, but the logic should be much more obvious, I think. 3. Fixed a bug in `git_diff_merge` where it freed a string pool while some of the string data was still in use. This led to `git_diff_print_patch` accessing memory that had been freed. The rest of this commit contains improved documentation in `diff.h` to make the behavior and the equivalencies with core git clearer, and a bunch of new tests to cover the various cases, oh and a minor simplification of `examples/diff.c`.
2012-05-18Basic setup for profilingRussell Belfer
This fixes the examples so they will build and adds a PROFILE option to the CMakeFile that enabled gprof info on non-Windows
2012-03-13examples/diff: update example codeschu
Signed-off-by: schu <schu-github@schulog.org>
2012-03-03Update diff to use iteratorsRussell Belfer
This is a major reorganization of the diff code. This changes the diff functions to use the iterators for traversing the content. This allowed a lot of code to be simplified. Also, this moved the functions relating to outputting a diff into a new file (diff_output.c). This includes a number of other changes - adding utility functions, extending iterators, etc. plus more tests for the diff code. This also takes the example diff.c program much further in terms of emulating git-diff command line options.
2012-03-03Continue implementation of git-diffRussell Belfer
* 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
2012-03-03Clean up diff implementation for reviewRussell Belfer
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.