<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libgit2.git/examples/diff.c, branch cmn/pack-objects-memory</title>
<subtitle>github.com: libgit2/libgit2.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/'/>
<entry>
<title>Use git_diff_get_stats in example/diff + refactor</title>
<updated>2014-04-22T19:33:27+00:00</updated>
<author>
<name>Russell Belfer</name>
<email>rb@github.com</email>
</author>
<published>2014-04-22T19:33:27+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=8d09efa24ee01e9e4b14672978bfd1bb1ca2436a'/>
<id>8d09efa24ee01e9e4b14672978bfd1bb1ca2436a</id>
<content type='text'>
This takes the `--stat` and related example options in the example
diff.c program and converts them to use the `git_diff_get_stats`
API which nicely formats stats for you.

I went to add bar-graph scaling to the stats formatter and noticed
that the `git_diff_stats` structure was holding on to all of the
`git_patch` objects.  Unfortunately, each of these objects keeps
the full text of the diff in memory, so this is very expensive.  I
ended up modifying `git_diff_stats` to keep just the data that it
needs to keep and allowed it to release the patches.  Then, I added
width scaling to the output on top of that.

In making the diff example program match 'git diff' output, I ended
up removing an newline from the sumamry output which I then had to
compensate for in the email formatting to match the expectations.

Lastly, I went through and refactored the tests to use a couple of
helper functions and reduce the overall amount of code there.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This takes the `--stat` and related example options in the example
diff.c program and converts them to use the `git_diff_get_stats`
API which nicely formats stats for you.

I went to add bar-graph scaling to the stats formatter and noticed
that the `git_diff_stats` structure was holding on to all of the
`git_patch` objects.  Unfortunately, each of these objects keeps
the full text of the diff in memory, so this is very expensive.  I
ended up modifying `git_diff_stats` to keep just the data that it
needs to keep and allowed it to release the patches.  Then, I added
width scaling to the output on top of that.

In making the diff example program match 'git diff' output, I ended
up removing an newline from the sumamry output which I then had to
compensate for in the email formatting to match the expectations.

Lastly, I went through and refactored the tests to use a couple of
helper functions and reduce the overall amount of code there.
</pre>
</div>
</content>
</entry>
<entry>
<title>Some doc and examples/diff.c changes</title>
<updated>2014-04-22T16:17:29+00:00</updated>
<author>
<name>Russell Belfer</name>
<email>rb@github.com</email>
</author>
<published>2014-04-21T23:08:05+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=12e422a0562de2aebb05f5f414dbcde7caf85886'/>
<id>12e422a0562de2aebb05f5f414dbcde7caf85886</id>
<content type='text'>
I was playing with "git diff-index" and wanted to be able to
emulate that behavior a little more closely with the diff example.

Also, I wanted to play with running `git_diff_tree_to_workdir`
directly even though core Git doesn't exactly have the equivalent,
so I added a command line option for that and tweaked some other
things in the example code.

This changes a minor output thing in that the "raw" print helper
function will no longer add ellipses (...) if the OID is not
actually abbreviated.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I was playing with "git diff-index" and wanted to be able to
emulate that behavior a little more closely with the diff example.

Also, I wanted to play with running `git_diff_tree_to_workdir`
directly even though core Git doesn't exactly have the equivalent,
so I added a command line option for that and tweaked some other
things in the example code.

This changes a minor output thing in that the "raw" print helper
function will no longer add ellipses (...) if the OID is not
actually abbreviated.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge completed: resolve the conflict with the upstream</title>
<updated>2014-03-06T03:16:36+00:00</updated>
<author>
<name>Sun He</name>
<email>sunheehnus@gmail.com</email>
</author>
<published>2014-03-06T03:16:36+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=6246de93b65fc74cba2e17ab031402adff84433f'/>
<id>6246de93b65fc74cba2e17ab031402adff84433f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix the output format of diff</title>
<updated>2014-03-05T12:33:20+00:00</updated>
<author>
<name>Sun He</name>
<email>sunheehnus@gmail.com</email>
</author>
<published>2014-03-05T12:33:20+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=8384a50a2171f57cc1b8158777b124d2022db94e'/>
<id>8384a50a2171f57cc1b8158777b124d2022db94e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add the --shortstat flag to examples/diff.c</title>
<updated>2014-03-05T12:13:34+00:00</updated>
<author>
<name>Sun He</name>
<email>sunheehnus@gmail.com</email>
</author>
<published>2014-03-05T12:13:34+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=45d2e8dc4687b5da6e872fbfa960ea7cff3b3867'/>
<id>45d2e8dc4687b5da6e872fbfa960ea7cff3b3867</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>examples/diff: Add minimal, patience diff options.</title>
<updated>2014-03-05T04:06:31+00:00</updated>
<author>
<name>Brian Gesiak</name>
<email>modocache@gmail.com</email>
</author>
<published>2014-03-05T04:06:31+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=0d3c8a9d9202f69ee0366f2eeab1765b18b49baa'/>
<id>0d3c8a9d9202f69ee0366f2eeab1765b18b49baa</id>
<content type='text'>
- Add minimal, patience diff options to diff example. libgit2
  `diff_xdiff.git_xdiff_init` already supports these flags, so
  no additional change is necessary.
- Remove minimal and patience flag addition from project list.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Add minimal, patience diff options to diff example. libgit2
  `diff_xdiff.git_xdiff_init` already supports these flags, so
  no additional change is necessary.
- Remove minimal and patience flag addition from project list.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix warnings and code style issues</title>
<updated>2014-02-27T22:01:16+00:00</updated>
<author>
<name>Russell Belfer</name>
<email>rb@github.com</email>
</author>
<published>2014-02-27T22:01:16+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=d88399922f622baef91c6f4e4e67b2091653cb65'/>
<id>d88399922f622baef91c6f4e4e67b2091653cb65</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>replace 'out' with 'patch',replace the literal tabs with '\t'.</title>
<updated>2014-02-09T13:08:42+00:00</updated>
<author>
<name>rocky-luo</name>
<email>rocky-luo@outlook.com</email>
</author>
<published>2014-02-09T13:08:42+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=8086b78be05dbcffc80e8a87c15fc10bb7534547'/>
<id>8086b78be05dbcffc80e8a87c15fc10bb7534547</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>add example for diff with --numstat</title>
<updated>2014-02-08T12:10:19+00:00</updated>
<author>
<name>rocky-luo</name>
<email>rocky-luo@outlook.com</email>
</author>
<published>2014-02-08T12:10:19+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=4f5a3f400be638de28fb7cc5d926cc79125d52f7'/>
<id>4f5a3f400be638de28fb7cc5d926cc79125d52f7</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Replace copyright topmatter in example files</title>
<updated>2013-11-02T12:33:26+00:00</updated>
<author>
<name>Ben Straub</name>
<email>bs@github.com</email>
</author>
<published>2013-11-02T12:33:26+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=6cb831bd5667d934d8947279523cb235b4f8bba4'/>
<id>6cb831bd5667d934d8947279523cb235b4f8bba4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
