<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/gitano/libgit2.git/tests-clar/diff, branch fixups</title>
<subtitle>git.gitano.org.uk: libgit2.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/gitano/libgit2.git/'/>
<entry>
<title>Diff iterators</title>
<updated>2012-09-05T22:17:24+00:00</updated>
<author>
<name>Russell Belfer</name>
<email>rb@github.com</email>
</author>
<published>2012-08-30T21:24:16+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/gitano/libgit2.git/commit/?id=f335ecd6e126aa9dea28786522c0e6ce71596e91'/>
<id>f335ecd6e126aa9dea28786522c0e6ce71596e91</id>
<content type='text'>
This refactors the diff output code so that an iterator object
can be used to traverse and generate the diffs, instead of just
the `foreach()` style with callbacks.  The code has been rearranged
so that the two styles can still share most functions.

This also replaces `GIT_REVWALKOVER` with `GIT_ITEROVER` and uses
that as a common error code for marking the end of iteration when
using a iterator style of object.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This refactors the diff output code so that an iterator object
can be used to traverse and generate the diffs, instead of just
the `foreach()` style with callbacks.  The code has been rearranged
so that the two styles can still share most functions.

This also replaces `GIT_REVWALKOVER` with `GIT_ITEROVER` and uses
that as a common error code for marking the end of iteration when
using a iterator style of object.
</pre>
</div>
</content>
</entry>
<entry>
<title>Minor bug fixes in diff code</title>
<updated>2012-08-22T20:57:57+00:00</updated>
<author>
<name>Russell Belfer</name>
<email>rb@github.com</email>
</author>
<published>2012-08-22T20:57:57+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/gitano/libgit2.git/commit/?id=5fdc41e76591aebdbae3b49440bc2c8b2430718c'/>
<id>5fdc41e76591aebdbae3b49440bc2c8b2430718c</id>
<content type='text'>
In looking at PR #878, I found a few small bugs in the diff code,
mostly related to work that can be avoided when processing tree-
to-tree diffs that was always being carried out.  This commit has
some small fixes in it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In looking at PR #878, I found a few small bugs in the diff code,
mostly related to work that can be avoided when processing tree-
to-tree diffs that was always being carried out.  This commit has
some small fixes in it.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge remote-tracking branch 'arrbee/tree-walk-fixes' into development</title>
<updated>2012-08-06T10:41:08+00:00</updated>
<author>
<name>Vicent Marti</name>
<email>tanoku@gmail.com</email>
</author>
<published>2012-08-06T10:41:08+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/gitano/libgit2.git/commit/?id=51e1d8084641bd36416bf6f127b31d47d64cce69'/>
<id>51e1d8084641bd36416bf6f127b31d47d64cce69</id>
<content type='text'>
Conflicts:
	src/notes.c
	src/transports/git.c
	src/transports/http.c
	src/transports/local.c
	tests-clar/odb/foreach.c
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Conflicts:
	src/notes.c
	src/transports/git.c
	src/transports/http.c
	src/transports/local.c
	tests-clar/odb/foreach.c
</pre>
</div>
</content>
</entry>
<entry>
<title>Update iterators for consistency across library</title>
<updated>2012-08-04T00:08:01+00:00</updated>
<author>
<name>Russell Belfer</name>
<email>rb@github.com</email>
</author>
<published>2012-08-04T00:08:01+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/gitano/libgit2.git/commit/?id=5dca201072724e4230141796d7c9f8836a277de8'/>
<id>5dca201072724e4230141796d7c9f8836a277de8</id>
<content type='text'>
This updates all the `foreach()` type functions across the library
that take callbacks from the user to have a consistent behavior.
The rules are:

* A callback terminates the loop by returning any non-zero value
* Once the callback returns non-zero, it will not be called again
  (i.e. the loop stops all iteration regardless of state)
* If the callback returns non-zero, the parent fn returns GIT_EUSER
* Although the parent returns GIT_EUSER, no error will be set in
  the library and `giterr_last()` will return NULL if called.

This commit makes those changes across the library and adds tests
for most of the iteration APIs to make sure that they follow the
above rules.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This updates all the `foreach()` type functions across the library
that take callbacks from the user to have a consistent behavior.
The rules are:

* A callback terminates the loop by returning any non-zero value
* Once the callback returns non-zero, it will not be called again
  (i.e. the loop stops all iteration regardless of state)
* If the callback returns non-zero, the parent fn returns GIT_EUSER
* Although the parent returns GIT_EUSER, no error will be set in
  the library and `giterr_last()` will return NULL if called.

This commit makes those changes across the library and adds tests
for most of the iteration APIs to make sure that they follow the
above rules.
</pre>
</div>
</content>
</entry>
<entry>
<title>portability: Improve x86/amd64 compatibility</title>
<updated>2012-07-24T14:10:12+00:00</updated>
<author>
<name>nulltoken</name>
<email>emeric.fermas@gmail.com</email>
</author>
<published>2012-07-24T05:57:58+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/gitano/libgit2.git/commit/?id=b8457baae24269c9fb777591e2a0e1b425ba31b6'/>
<id>b8457baae24269c9fb777591e2a0e1b425ba31b6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix bug with merging diffs with null options</title>
<updated>2012-07-19T17:23:45+00:00</updated>
<author>
<name>Russell Belfer</name>
<email>rb@github.com</email>
</author>
<published>2012-07-19T17:23:45+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/gitano/libgit2.git/commit/?id=71d273583755c0a2b7f5d608f017f4586add51e4'/>
<id>71d273583755c0a2b7f5d608f017f4586add51e4</id>
<content type='text'>
A diff that is created with a NULL options parameter could result
in a NULL prefix string, but diff merge was unconditionally
strdup'ing it.  I added a test to replicate the issue and then a
new method that does the right thing with NULL values.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A diff that is created with a NULL options parameter could result
in a NULL prefix string, but diff merge was unconditionally
strdup'ing it.  I added a test to replicate the issue and then a
new method that does the right thing with NULL values.
</pre>
</div>
</content>
</entry>
<entry>
<title>diff: make inter-hunk-context default value git-compliant</title>
<updated>2012-07-02T15:27:49+00:00</updated>
<author>
<name>yorah</name>
<email>yoram.harmelin@gmail.com</email>
</author>
<published>2012-07-02T09:18:01+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/gitano/libgit2.git/commit/?id=29f9186d1b772994f65bb87ac88180d7d9d4141b'/>
<id>29f9186d1b772994f65bb87ac88180d7d9d4141b</id>
<content type='text'>
Default in git core is 0, not 3
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Default in git core is 0, not 3
</pre>
</div>
</content>
</entry>
<entry>
<title>Plug a few leaks</title>
<updated>2012-06-19T22:46:34+00:00</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>carlos@cmartin.tk</email>
</author>
<published>2012-06-19T22:46:26+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/gitano/libgit2.git/commit/?id=cdca82c7842ade2074f37be22f2251d6a9040a9d'/>
<id>cdca82c7842ade2074f37be22f2251d6a9040a9d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</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://91.123.203.49/cgit/delta/gitano/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>Fix filemode comparison in diffs</title>
<updated>2012-06-08T19:09:10+00:00</updated>
<author>
<name>Russell Belfer</name>
<email>rb@github.com</email>
</author>
<published>2012-06-04T23:17:41+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/gitano/libgit2.git/commit/?id=0abd724454078f2089701b54be94df7306dcfb8e'/>
<id>0abd724454078f2089701b54be94df7306dcfb8e</id>
<content type='text'>
File modes were both not being ignored properly on platforms
where they should be ignored, nor be diffed consistently on
platforms where they are supported.

This change adds a number of diff and status filemode change
tests.  This also makes sure that filemode-only changes are
included in the diff output when they occur and that filemode
changes are ignored successfully when core.filemode is false.

There is no code that automatically toggles core.filemode
based on the capabilities of the current platform, so the user
still needs to be careful in their .git/config file.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
File modes were both not being ignored properly on platforms
where they should be ignored, nor be diffed consistently on
platforms where they are supported.

This change adds a number of diff and status filemode change
tests.  This also makes sure that filemode-only changes are
included in the diff output when they occur and that filemode
changes are ignored successfully when core.filemode is false.

There is no code that automatically toggles core.filemode
based on the capabilities of the current platform, so the user
still needs to be careful in their .git/config file.
</pre>
</div>
</content>
</entry>
</feed>
