<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/gitpython.git/git/test/fixtures, branch 2.0.5</title>
<subtitle>github.com: gitpython-developers/GitPython.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/gitpython.git/'/>
<entry>
<title>Merge pull request #456 from gitpython-developers/fix-for-invalid-data-in-commits</title>
<updated>2016-05-30T16:58:30+00:00</updated>
<author>
<name>Sebastian Thiel</name>
<email>byronimo@gmail.com</email>
</author>
<published>2016-05-30T16:58:30+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/gitpython.git/commit/?id=79fdaf349fa8ad3524f67f1ef86c38ecfc317585'/>
<id>79fdaf349fa8ad3524f67f1ef86c38ecfc317585</id>
<content type='text'>
Add test case as example of Git commit with invalid data</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add test case as example of Git commit with invalid data</pre>
</div>
</content>
</entry>
<entry>
<title>Add test case as example of Git commit with invalid data</title>
<updated>2016-05-30T14:32:26+00:00</updated>
<author>
<name>Vincent Driessen</name>
<email>me@nvie.com</email>
</author>
<published>2016-05-30T14:20:22+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/gitpython.git/commit/?id=0eafe201905d85be767c24106eb1ab12efd3ee22'/>
<id>0eafe201905d85be767c24106eb1ab12efd3ee22</id>
<content type='text'>
This is a real commit from the microjs.com open source project, see
https://github.com/madrobby/microjs.com/commit/7e8457c17850d0991763941213dcb403d80f39f8,
which is declared to be encoded in UTF-8, but contains invalid bytes.

This makes GitPython choke on it while decoding.  Rather than choking,
this should instead accept the error and replace the invalid bytes by
the �  (\x80) char.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a real commit from the microjs.com open source project, see
https://github.com/madrobby/microjs.com/commit/7e8457c17850d0991763941213dcb403d80f39f8,
which is declared to be encoded in UTF-8, but contains invalid bytes.

This makes GitPython choke on it while decoding.  Rather than choking,
this should instead accept the error and replace the invalid bytes by
the �  (\x80) char.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix bug in diff parser output</title>
<updated>2016-05-30T13:44:46+00:00</updated>
<author>
<name>Vincent Driessen</name>
<email>me@nvie.com</email>
</author>
<published>2016-05-30T13:26:23+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/gitpython.git/commit/?id=1faf84f8eb760b003ad2be81432443bf443b82e6'/>
<id>1faf84f8eb760b003ad2be81432443bf443b82e6</id>
<content type='text'>
The diff --patch parser was missing some edge case where Git would
encode non-ASCII chars in path names as octals, but these weren't
decoded properly.

    \360\237\222\251.txt

Decoded via utf-8, that will return:

    💩.txt
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The diff --patch parser was missing some edge case where Git would
encode non-ASCII chars in path names as octals, but these weren't
decoded properly.

    \360\237\222\251.txt

Decoded via utf-8, that will return:

    💩.txt
</pre>
</div>
</content>
</entry>
<entry>
<title>Split lines by new line characters</title>
<updated>2016-05-24T15:19:14+00:00</updated>
<author>
<name>Jonathan Chu</name>
<email>jonathan.chu@me.com</email>
</author>
<published>2016-05-24T15:19:14+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/gitpython.git/commit/?id=73ab28744df3fc292a71c3099ff1f3a20471f188'/>
<id>73ab28744df3fc292a71c3099ff1f3a20471f188</id>
<content type='text'>
Opt to split lines by the new line character instead of letting
`splitlines()` do this. This helps catch the issue when there are
special characters in the line, particular the commit summary section.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Opt to split lines by the new line character instead of letting
`splitlines()` do this. This helps catch the issue when there are
special characters in the line, particular the commit summary section.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix diff patch parser for paths with unsafe chars</title>
<updated>2016-04-19T21:46:54+00:00</updated>
<author>
<name>Vincent Driessen</name>
<email>me@nvie.com</email>
</author>
<published>2016-04-19T21:41:01+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/gitpython.git/commit/?id=7fbc182e6d4636f67f44e5893dee3dcedfa90e04'/>
<id>7fbc182e6d4636f67f44e5893dee3dcedfa90e04</id>
<content type='text'>
This specifically covers the cases where unsafe chars occur in path
names, and git-diff -p will escape those.

From the git-diff-tree manpage:

&gt; 3. TAB, LF, double quote and backslash characters in pathnames are
&gt;    represented as \t, \n, \" and \\, respectively. If there is need
&gt;    for such substitution then the whole pathname is put in double
&gt;    quotes.

This patch checks whether or not this has happened and will unescape
those paths accordingly.

One thing to note here is that, depending on the position in the patch
format, those paths may be prefixed with an a/ or b/.  I've specifically
made sure to never interpret a path that actually starts with a/ or b/
incorrectly.

Example of that subtlety below.  Here, the actual file path is
"b/normal".  On the diff file that gets encoded as "b/b/normal".

     diff --git a/b/normal b/b/normal
     new file mode 100644
     index 0000000000000000000000000000000000000000..eaf5f7510320b6a327fb308379de2f94d8859a54
     --- /dev/null
     +++ b/b/normal
     @@ -0,0 +1 @@
     +dummy content

Here, we prefer the "---" and "+++" lines' values.  Note that these
paths start with a/ or b/.  The only exception is the value "/dev/null",
which is handled as a special case.

Suppose now the file gets moved "b/moved", the output of that diff would
then be this:

     diff --git a/b/normal b/b/moved
     similarity index 100%
     rename from b/normal
     rename to b/moved

We prefer the "rename" lines' values in this case (the "diff" line is
always a last resort).  Take note that those lines are not prefixed with
a/ or b/, but the ones in the "diff" line are (just like the ones in
"---" or "+++" lines).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This specifically covers the cases where unsafe chars occur in path
names, and git-diff -p will escape those.

From the git-diff-tree manpage:

&gt; 3. TAB, LF, double quote and backslash characters in pathnames are
&gt;    represented as \t, \n, \" and \\, respectively. If there is need
&gt;    for such substitution then the whole pathname is put in double
&gt;    quotes.

This patch checks whether or not this has happened and will unescape
those paths accordingly.

One thing to note here is that, depending on the position in the patch
format, those paths may be prefixed with an a/ or b/.  I've specifically
made sure to never interpret a path that actually starts with a/ or b/
incorrectly.

Example of that subtlety below.  Here, the actual file path is
"b/normal".  On the diff file that gets encoded as "b/b/normal".

     diff --git a/b/normal b/b/normal
     new file mode 100644
     index 0000000000000000000000000000000000000000..eaf5f7510320b6a327fb308379de2f94d8859a54
     --- /dev/null
     +++ b/b/normal
     @@ -0,0 +1 @@
     +dummy content

Here, we prefer the "---" and "+++" lines' values.  Note that these
paths start with a/ or b/.  The only exception is the value "/dev/null",
which is handled as a special case.

Suppose now the file gets moved "b/moved", the output of that diff would
then be this:

     diff --git a/b/normal b/b/moved
     similarity index 100%
     rename from b/normal
     rename to b/moved

We prefer the "rename" lines' values in this case (the "diff" line is
always a last resort).  Take note that those lines are not prefixed with
a/ or b/, but the ones in the "diff" line are (just like the ones in
"---" or "+++" lines).
</pre>
</div>
</content>
</entry>
<entry>
<title>Make diff patch parsing more reliable</title>
<updated>2016-04-19T19:45:18+00:00</updated>
<author>
<name>Vincent Driessen</name>
<email>me@nvie.com</email>
</author>
<published>2016-04-14T19:27:39+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/gitpython.git/commit/?id=e77128e5344ce7d84302facc08d17c3151037ec3'/>
<id>e77128e5344ce7d84302facc08d17c3151037ec3</id>
<content type='text'>
The a_path and b_path cannot reliably be read from the first diff line
as it's ambiguous.  From the git-diff manpage:

  &gt; The a/ and b/ filenames are the same unless rename/copy is involved.
  &gt; Especially, **even for a creation or a deletion**, /dev/null is not
  &gt; used in place of the a/ or b/ filenames.

This patch changes the a_path and b_path detection to read it from the
more reliable locations further down the diff headers.  Two use cases
are fixed by this:

  - As the man page snippet above states, for new/deleted files the a
    or b path will now be properly None.
  - File names with spaces in it are now properly parsed.

Working on this patch, I realized the --- and +++ lines really belong to
the diff header, not the diff contents.  This means that when parsing
the patch format, the --- and +++ will now be swallowed, and not end up
anymore as part of the diff contents.  The diff contents now always
start with an @@ line.

This may be a breaking change for some users that rely on this
behaviour.  However, those users could now access that information more
reliably via the normal Diff properties a_path and b_path now.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The a_path and b_path cannot reliably be read from the first diff line
as it's ambiguous.  From the git-diff manpage:

  &gt; The a/ and b/ filenames are the same unless rename/copy is involved.
  &gt; Especially, **even for a creation or a deletion**, /dev/null is not
  &gt; used in place of the a/ or b/ filenames.

This patch changes the a_path and b_path detection to read it from the
more reliable locations further down the diff headers.  Two use cases
are fixed by this:

  - As the man page snippet above states, for new/deleted files the a
    or b path will now be properly None.
  - File names with spaces in it are now properly parsed.

Working on this patch, I realized the --- and +++ lines really belong to
the diff header, not the diff contents.  This means that when parsing
the patch format, the --- and +++ will now be swallowed, and not end up
anymore as part of the diff contents.  The diff contents now always
start with an @@ line.

This may be a breaking change for some users that rely on this
behaviour.  However, those users could now access that information more
reliably via the normal Diff properties a_path and b_path now.
</pre>
</div>
</content>
</entry>
<entry>
<title>Support "root" as a special value in .diff() calls</title>
<updated>2016-04-14T10:39:37+00:00</updated>
<author>
<name>Vincent Driessen</name>
<email>me@nvie.com</email>
</author>
<published>2016-04-12T13:55:01+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/gitpython.git/commit/?id=5de21c7fa2bdd5cd50c4f62ba848af54589167d0'/>
<id>5de21c7fa2bdd5cd50c4f62ba848af54589167d0</id>
<content type='text'>
This enabled getting diff patches for root commits.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This enabled getting diff patches for root commits.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add incremental blame support</title>
<updated>2016-04-13T14:44:17+00:00</updated>
<author>
<name>Vincent Driessen</name>
<email>me@nvie.com</email>
</author>
<published>2016-04-13T12:52:18+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/gitpython.git/commit/?id=e5b8220a1a967abdf2bae2124e3e22a9eea3729f'/>
<id>e5b8220a1a967abdf2bae2124e3e22a9eea3729f</id>
<content type='text'>
This adds a sibling method to Repo's blame method:

    Repo.blame_incremental(rev, path, **kwargs)

This can alternatively be called using:

    Repo.blame(rev, path, incremental=True)

The main difference is that blame incremental is a bit more efficient
and does not return the full file's contents, just the commits and the
line number ranges.  The parser is a bit more straight-forward and
faster since the incremental output format is defined a little stricter.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This adds a sibling method to Repo's blame method:

    Repo.blame_incremental(rev, path, **kwargs)

This can alternatively be called using:

    Repo.blame(rev, path, incremental=True)

The main difference is that blame incremental is a bit more efficient
and does not return the full file's contents, just the commits and the
line number ranges.  The parser is a bit more straight-forward and
faster since the incremental output format is defined a little stricter.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add test and fixture for diff index from raw format</title>
<updated>2016-03-16T18:08:31+00:00</updated>
<author>
<name>Jonathan Chu</name>
<email>jonathan.chu@me.com</email>
</author>
<published>2016-03-16T18:08:31+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/gitpython.git/commit/?id=e328ffddec722be3fba2c9b637378e31e623d58e'/>
<id>e328ffddec722be3fba2c9b637378e31e623d58e</id>
<content type='text'>
This tests the edge case of doing a diff against a single whitespace
filename and returns the proper change type.  All other normal usage of
this diff classmethod should remain unchanged.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This tests the edge case of doing a diff against a single whitespace
filename and returns the proper change type.  All other normal usage of
this diff classmethod should remain unchanged.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(config): ignore empty values in config file</title>
<updated>2015-09-06T13:11:54+00:00</updated>
<author>
<name>Sebastian Thiel</name>
<email>byronimo@gmail.com</email>
</author>
<published>2015-09-06T13:11:54+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/gitpython.git/commit/?id=074842accb51b2a0c2c1193018d9f374ac5e948f'/>
<id>074842accb51b2a0c2c1193018d9f374ac5e948f</id>
<content type='text'>
Similar to git, we now ignore options which have no value.
Previously it would not handle it consistently, and throw a parsing
error the first time the cache was built.

Afterwards, it was fully usable though.
Now we specifically check for the case of no-value options instead.

Closes #349
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Similar to git, we now ignore options which have no value.
Previously it would not handle it consistently, and throw a parsing
error the first time the cache was built.

Afterwards, it was fully usable though.
Now we specifically check for the case of no-value options instead.

Closes #349
</pre>
</div>
</content>
</entry>
</feed>
