<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libgit2.git/examples/diff.c, branch features/push</title>
<subtitle>github.com: libgit2/libgit2.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/'/>
<entry>
<title>Improve docs, examples, warnings</title>
<updated>2012-11-01T21:08:30+00:00</updated>
<author>
<name>Russell Belfer</name>
<email>rb@github.com</email>
</author>
<published>2012-11-01T21:08:30+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=b90500f03d3ae60f1f79d7adb36d95632a29d7e5'/>
<id>b90500f03d3ae60f1f79d7adb36d95632a29d7e5</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>Minor fixes, cleanups, and clarifications</title>
<updated>2012-06-08T19:11:13+00:00</updated>
<author>
<name>Russell Belfer</name>
<email>rb@github.com</email>
</author>
<published>2012-06-08T18:56:24+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=145e696b498a046762e4df9045c9b71440308486'/>
<id>145e696b498a046762e4df9045c9b71440308486</id>
<content type='text'>
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`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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`.
</pre>
</div>
</content>
</entry>
<entry>
<title>Basic setup for profiling</title>
<updated>2012-05-17T20:05:17+00:00</updated>
<author>
<name>Russell Belfer</name>
<email>rb@github.com</email>
</author>
<published>2012-05-17T20:05:17+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=706a9974a297ea1b38c6aab886b54598409725e8'/>
<id>706a9974a297ea1b38c6aab886b54598409725e8</id>
<content type='text'>
This fixes the examples so they will build and adds a PROFILE
option to the CMakeFile that enabled gprof info on non-Windows
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes the examples so they will build and adds a PROFILE
option to the CMakeFile that enabled gprof info on non-Windows
</pre>
</div>
</content>
</entry>
<entry>
<title>examples/diff: update example code</title>
<updated>2012-03-13T15:51:16+00:00</updated>
<author>
<name>schu</name>
<email>schu-github@schulog.org</email>
</author>
<published>2012-03-13T15:48:07+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=288c8a25750af694685ad71e08b6708729266aa9'/>
<id>288c8a25750af694685ad71e08b6708729266aa9</id>
<content type='text'>
Signed-off-by: schu &lt;schu-github@schulog.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: schu &lt;schu-github@schulog.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Update diff to use iterators</title>
<updated>2012-03-02T23:49:29+00:00</updated>
<author>
<name>Russell Belfer</name>
<email>arrbee@arrbee.com</email>
</author>
<published>2012-02-29T00:14:47+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=74fa4bfae37e9d7c9e35550c881b114d7a83c4fa'/>
<id>74fa4bfae37e9d7c9e35550c881b114d7a83c4fa</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>Continue implementation of git-diff</title>
<updated>2012-03-02T23:49:29+00:00</updated>
<author>
<name>Russell Belfer</name>
<email>arrbee@arrbee.com</email>
</author>
<published>2012-02-07T20:14:28+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=a2e895be820a2fd77285ef4576afe53f68c96ca2'/>
<id>a2e895be820a2fd77285ef4576afe53f68c96ca2</id>
<content type='text'>
* 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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 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
</pre>
</div>
</content>
</entry>
<entry>
<title>Clean up diff implementation for review</title>
<updated>2012-03-02T23:49:28+00:00</updated>
<author>
<name>Russell Belfer</name>
<email>arrbee@arrbee.com</email>
</author>
<published>2012-02-04T00:53:01+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=3a4375901a92efdc641c714ec9fd07b53f2f781e'/>
<id>3a4375901a92efdc641c714ec9fd07b53f2f781e</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
</feed>
