<feed xmlns='http://www.w3.org/2005/Atom'>
<title>GitPython/git/test/fixtures, branch 2.0.3</title>
<subtitle>Forked from https://github.com/gitpython-developers/GitPython</subtitle>
<link rel='alternate' type='text/html' href='https://git.otimperi.dev/GitPython/'/>
<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='https://git.otimperi.dev/GitPython/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='https://git.otimperi.dev/GitPython/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='https://git.otimperi.dev/GitPython/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='https://git.otimperi.dev/GitPython/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='https://git.otimperi.dev/GitPython/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='https://git.otimperi.dev/GitPython/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='https://git.otimperi.dev/GitPython/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>
<entry>
<title>fix(cmd): don't open stdout when fetching</title>
<updated>2015-07-03T13:37:29+00:00</updated>
<author>
<name>Sebastian Thiel</name>
<email>byronimo@gmail.com</email>
</author>
<published>2015-07-03T13:37:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.otimperi.dev/GitPython/commit/?id=369e564174bfdd592d64a027bebc3f3f41ee8f11'/>
<id>369e564174bfdd592d64a027bebc3f3f41ee8f11</id>
<content type='text'>
This allows us to use the main thread to parse stderr to get progress,
and resolve assertion failures hopefully once and for all.

Relates to #301
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This allows us to use the main thread to parse stderr to get progress,
and resolve assertion failures hopefully once and for all.

Relates to #301
</pre>
</div>
</content>
</entry>
<entry>
<title>test(git): remove unnecessary fixture</title>
<updated>2015-07-03T10:40:57+00:00</updated>
<author>
<name>Sebastian Thiel</name>
<email>byronimo@gmail.com</email>
</author>
<published>2015-07-03T10:40:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.otimperi.dev/GitPython/commit/?id=36dbe7e9b55a09c68ba179bcf2c3d3e1b7898ef3'/>
<id>36dbe7e9b55a09c68ba179bcf2c3d3e1b7898ef3</id>
<content type='text'>
Test was adjusted as well to parse only a single file which simulates
stderr output.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Test was adjusted as well to parse only a single file which simulates
stderr output.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(cmd): line parsing</title>
<updated>2015-07-03T09:58:01+00:00</updated>
<author>
<name>Sebastian Thiel</name>
<email>byronimo@gmail.com</email>
</author>
<published>2015-07-03T09:43:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.otimperi.dev/GitPython/commit/?id=040108747e2f868c61f870799a78850b792ddd0a'/>
<id>040108747e2f868c61f870799a78850b792ddd0a</id>
<content type='text'>
* Previously we could fail to parse the last line within a read buffer,
  which is now fixed.
* Added a test to verify our *slow* line parsing works as expected.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Previously we could fail to parse the last line within a read buffer,
  which is now fixed.
* Added a test to verify our *slow* line parsing works as expected.
</pre>
</div>
</content>
</entry>
</feed>
