<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libgit2.git/tests/patch/parse.c, branch ethomson/https_proxy</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>patch_parse: allow parsing ambiguous patch headers</title>
<updated>2017-11-11T20:29:28+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2017-09-22T11:39:05+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=80226b5f674e6d04a4064ebc93c09fc667e8fa52'/>
<id>80226b5f674e6d04a4064ebc93c09fc667e8fa52</id>
<content type='text'>
The git patch format allows for having unquoted paths with whitespaces
inside. This format becomes ambiguous to parse, e.g. in the following
example:

    diff --git a/file b/with spaces.txt b/file b/with spaces.txt

While we cannot parse this in a correct way, we can instead use the
"---" and "+++" lines to retrieve the file names, as the path is not
followed by anything here but spans the complete remaining line. Because
of this, we can simply bail outwhen parsing the "diff --git" header here
without an actual error and then proceed to just take the paths from the
other headers.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The git patch format allows for having unquoted paths with whitespaces
inside. This format becomes ambiguous to parse, e.g. in the following
example:

    diff --git a/file b/with spaces.txt b/file b/with spaces.txt

While we cannot parse this in a correct way, we can instead use the
"---" and "+++" lines to retrieve the file names, as the path is not
followed by anything here but spans the complete remaining line. Because
of this, we can simply bail outwhen parsing the "diff --git" header here
without an actual error and then proceed to just take the paths from the
other headers.
</pre>
</div>
</content>
</entry>
<entry>
<title>patch: differentiate not found and invalid patches</title>
<updated>2016-05-26T18:01:08+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@github.com</email>
</author>
<published>2016-04-24T20:14:25+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=94e488a056942f1bb1ebbe7c9f0c693937726609'/>
<id>94e488a056942f1bb1ebbe7c9f0c693937726609</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>git_patch_parse_ctx: refcount the context</title>
<updated>2016-05-26T18:01:08+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@github.com</email>
</author>
<published>2016-04-21T04:04:14+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=17572f67ed9a3eb57b981d97468bd216d571bf10'/>
<id>17572f67ed9a3eb57b981d97468bd216d571bf10</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>patch: `git_patch_from_patchfile` -&gt; `git_patch_from_buffer`</title>
<updated>2016-05-26T18:01:08+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2015-11-21T17:27:03+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=440e3bae10a4758d5de8d7b8699bf4c412c1a163'/>
<id>440e3bae10a4758d5de8d7b8699bf4c412c1a163</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Introduce git_patch_options, handle prefixes</title>
<updated>2016-05-26T18:01:06+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@microsoft.com</email>
</author>
<published>2015-09-23T17:40:12+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=82175084e17d31051e691ebdcb5990a12d0230e7'/>
<id>82175084e17d31051e691ebdcb5990a12d0230e7</id>
<content type='text'>
Handle prefixes (in terms of number of path components) for patch
parsing.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Handle prefixes (in terms of number of path components) for patch
parsing.
</pre>
</div>
</content>
</entry>
<entry>
<title>patch_parse: ensure we can parse a patch</title>
<updated>2016-05-26T18:01:05+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@microsoft.com</email>
</author>
<published>2015-09-22T22:54:10+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=42b3442823c45e83ce8eb67607e1b90c3ea7f3af'/>
<id>42b3442823c45e83ce8eb67607e1b90c3ea7f3af</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
