<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libgit2.git/src/diff.c, branch attr-export</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>Add flag to turn off pathspec testing for diff and status</title>
<updated>2012-07-24T12:03:09+00:00</updated>
<author>
<name>yorah</name>
<email>yoram.harmelin@gmail.com</email>
</author>
<published>2012-07-23T16:16:09+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=a1773f9d89887d299248d15b43953d3fa494a025'/>
<id>a1773f9d89887d299248d15b43953d3fa494a025</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix getting status of files containing brackets</title>
<updated>2012-07-24T12:03:09+00:00</updated>
<author>
<name>yorah</name>
<email>yoram.harmelin@gmail.com</email>
</author>
<published>2012-07-18T14:26:55+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=ffbc689c8768c66cddf9ef3ab6c88c41ecf4c1ab'/>
<id>ffbc689c8768c66cddf9ef3ab6c88c41ecf4c1ab</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/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 sure we free all allocated resources</title>
<updated>2012-06-20T00:22:07+00:00</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>carlos@cmartin.tk</email>
</author>
<published>2012-06-20T00:15:42+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=1d94a7d0f6c8cb0d1fcf288a1734a7a5abd1b094'/>
<id>1d94a7d0f6c8cb0d1fcf288a1734a7a5abd1b094</id>
<content type='text'>
When the creation of one iterator fails, we need to free the prefix
and possibly one of the iterators. Make sure we do so.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When the creation of one iterator fails, we need to free the prefix
and possibly one of the iterators. Make sure we do so.
</pre>
</div>
</content>
</entry>
<entry>
<title>Make index add/append support core.filemode flag</title>
<updated>2012-06-19T21:27:02+00:00</updated>
<author>
<name>Russell Belfer</name>
<email>rb@github.com</email>
</author>
<published>2012-06-19T21:27:02+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=da825c92d92433240ceeaea70d7618395bcfb83d'/>
<id>da825c92d92433240ceeaea70d7618395bcfb83d</id>
<content type='text'>
This fixes git_index_add and git_index_append to behave more like
core git, preserving old filemode data in the index when adding
and/or appending with core.filemode = false.

This also has placeholder support for core.symlinks and
core.ignorecase, but those flags are not implemented (well,
symlinks has partial support for preserving mode information in
the same way that git does, but it isn't tested).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes git_index_add and git_index_append to behave more like
core git, preserving old filemode data in the index when adding
and/or appending with core.filemode = false.

This also has placeholder support for core.symlinks and
core.ignorecase, but those flags are not implemented (well,
symlinks has partial support for preserving mode information in
the same way that git does, but it isn't tested).
</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/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/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>
<entry>
<title>Fix bugs for status with spaces and reloaded attrs</title>
<updated>2012-05-25T00:14:56+00:00</updated>
<author>
<name>Russell Belfer</name>
<email>rb@github.com</email>
</author>
<published>2012-05-25T00:14:56+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=2a99df6909af4c93ce2741ddc5d15a7f52270f28'/>
<id>2a99df6909af4c93ce2741ddc5d15a7f52270f28</id>
<content type='text'>
This fixes two bugs:

* Issue #728 where git_status_file was not working for files
  that contain spaces.  This was caused by reusing the "fnmatch"
  parsing code from ignore and attribute files to interpret the
  "pathspec" that constrained the files to apply the status to.
  In that code, unescaped whitespace was considered terminal to
  the pattern, so a file with internal whitespace was excluded
  from the matched files.  The fix was to add a mode to that code
  that allows spaces and tabs inside patterns.  This mode only
  comes into play when parsing in-memory strings.

* The other issue was undetected, but it was in the recently
  added code to reload gitattributes / gitignores when they were
  changed on disk.  That code was not clearing out the old values
  from the cached file content before reparsing which meant that
  newly added patterns would be read in, but deleted patterns
  would not be removed.  The fix was to clear the vector of
  patterns in a cached file before reparsing the file.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes two bugs:

* Issue #728 where git_status_file was not working for files
  that contain spaces.  This was caused by reusing the "fnmatch"
  parsing code from ignore and attribute files to interpret the
  "pathspec" that constrained the files to apply the status to.
  In that code, unescaped whitespace was considered terminal to
  the pattern, so a file with internal whitespace was excluded
  from the matched files.  The fix was to add a mode to that code
  that allows spaces and tabs inside patterns.  This mode only
  comes into play when parsing in-memory strings.

* The other issue was undetected, but it was in the recently
  added code to reload gitattributes / gitignores when they were
  changed on disk.  That code was not clearing out the old values
  from the cached file content before reparsing which meant that
  newly added patterns would be read in, but deleted patterns
  would not be removed.  The fix was to clear the vector of
  patterns in a cached file before reparsing the file.
</pre>
</div>
</content>
</entry>
<entry>
<title>errors: Rename error codes</title>
<updated>2012-05-17T23:48:50+00:00</updated>
<author>
<name>Vicent Martí</name>
<email>tanoku@gmail.com</email>
</author>
<published>2012-05-17T23:48:50+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=904b67e69fa15b7a3246e43b3d78645ffa2331f6'/>
<id>904b67e69fa15b7a3246e43b3d78645ffa2331f6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>errors: Rename the generic return codes</title>
<updated>2012-05-17T23:26:26+00:00</updated>
<author>
<name>Vicent Martí</name>
<email>tanoku@gmail.com</email>
</author>
<published>2012-05-17T23:21:06+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=e172cf082e62aa421703080d0bccb7b8762c8bd4'/>
<id>e172cf082e62aa421703080d0bccb7b8762c8bd4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
