<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libgit2.git/tests/network/refspecs.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>refspec: fix transforming nested stars</title>
<updated>2019-04-26T08:38:02+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2019-04-26T08:38:02+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=0c71e4cbd646a62fcbe534532178e841107d232d'/>
<id>0c71e4cbd646a62fcbe534532178e841107d232d</id>
<content type='text'>
When we transform a refspec with a component containing a glob, then
we simply copy over the component until the next separator from
the matching ref. E.g. if we have a ref "refs/heads/foo/bar" and
a refspec "refs/heads/*/bar:refs/remotes/origin/*/bar", we:

1. Copy over everything until hitting the glob from the &lt;dst&gt;
   part: "refs/remotes/origin/".
2. Strip the common prefix of ref and &lt;src&gt; part until the glob,
   which is "refs/heads/". This leaves us with a ref of "foo/bar".
3. Copy from the ref until the next "/" separator, resulting in
   "refs/remotes/origin/foo".
4. Copy over the remaining part of the &lt;dst&gt; spec, which is
   "bar": "refs/remotes/origin/foo/bar".

This worked just fine in a world where globs in refspecs were
restricted such that a globbing component may only contain a
single "*", only. But this restriction has been lifted, so that a
glob component may be nested between other characters, causing
the above algorithm to fail. Most notably the third step, where
we copy until hitting the next "/" separator, might result in a
wrong transformation. Given e.g. a ref "refs/gbranchg/head" and a
refspec "refs/g*g/head:refs/remotes/origin/*", we'd also be
copying the "g" between "branch" and "/" and end up with the
wrong transformed ref "refs/remotes/origin/branchg".

Instead of copying until the next component separator, we should
copy until we hit the pattern after the "*". So in the above
example, we'd copy until hitting the string "g/head".
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When we transform a refspec with a component containing a glob, then
we simply copy over the component until the next separator from
the matching ref. E.g. if we have a ref "refs/heads/foo/bar" and
a refspec "refs/heads/*/bar:refs/remotes/origin/*/bar", we:

1. Copy over everything until hitting the glob from the &lt;dst&gt;
   part: "refs/remotes/origin/".
2. Strip the common prefix of ref and &lt;src&gt; part until the glob,
   which is "refs/heads/". This leaves us with a ref of "foo/bar".
3. Copy from the ref until the next "/" separator, resulting in
   "refs/remotes/origin/foo".
4. Copy over the remaining part of the &lt;dst&gt; spec, which is
   "bar": "refs/remotes/origin/foo/bar".

This worked just fine in a world where globs in refspecs were
restricted such that a globbing component may only contain a
single "*", only. But this restriction has been lifted, so that a
glob component may be nested between other characters, causing
the above algorithm to fail. Most notably the third step, where
we copy until hitting the next "/" separator, might result in a
wrong transformation. Given e.g. a ref "refs/gbranchg/head" and a
refspec "refs/g*g/head:refs/remotes/origin/*", we'd also be
copying the "g" between "branch" and "/" and end up with the
wrong transformed ref "refs/remotes/origin/branchg".

Instead of copying until the next component separator, we should
copy until we hit the pattern after the "*". So in the above
example, we'd copy until hitting the string "g/head".
</pre>
</div>
</content>
</entry>
<entry>
<title>refs: loosen restriction on wildcard "*" refspecs</title>
<updated>2019-04-26T08:25:09+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2019-04-26T08:15:49+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=51214b85dedc39b734cce9d09b9311221a31de4b'/>
<id>51214b85dedc39b734cce9d09b9311221a31de4b</id>
<content type='text'>
In commit cd377f45c9 (refs: loosen restriction on wildcard "*"
refspecs, 2015-07-22) in git.git, the restrictions on wildcard
"*" refspecs has been loosened. While wildcards were previously
only allowed if the component is a single "*", this was changed
to also accept other patterns as part of the component.

We never adapted to that change and still reject any wildcard
patterns that aren't a single "*" only. Update our tests to
reflect the upstream change and adjust our own code accordingly.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In commit cd377f45c9 (refs: loosen restriction on wildcard "*"
refspecs, 2015-07-22) in git.git, the restrictions on wildcard
"*" refspecs has been loosened. While wildcards were previously
only allowed if the component is a single "*", this was changed
to also accept other patterns as part of the component.

We never adapted to that change and still reject any wildcard
patterns that aren't a single "*" only. Update our tests to
reflect the upstream change and adjust our own code accordingly.
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: network::refspecs: add missing assert when parsing refspec</title>
<updated>2019-04-26T07:09:46+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2019-04-26T07:09:46+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=9d651e05f07513b26c44c97304282ad49e49fe9e'/>
<id>9d651e05f07513b26c44c97304282ad49e49fe9e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>treewide: remove use of C++ style comments</title>
<updated>2018-07-13T06:25:12+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2018-06-25T09:56:52+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=9994cd3f0ffcd7b28d26c82ecb6564bc4072dc2a'/>
<id>9994cd3f0ffcd7b28d26c82ecb6564bc4072dc2a</id>
<content type='text'>
C++ style comment ("//") are not specified by the ISO C90 standard and
thus do not conform to it. While libgit2 aims to conform to C90, we did
not enforce it until now, which is why quite a lot of these
non-conforming comments have snuck into our codebase. Do a tree-wide
conversion of all C++ style comments to the supported C style comments
to allow us enforcing strict C90 compliance in a later commit.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
C++ style comment ("//") are not specified by the ISO C90 standard and
thus do not conform to it. While libgit2 aims to conform to C90, we did
not enforce it until now, which is why quite a lot of these
non-conforming comments have snuck into our codebase. Do a tree-wide
conversion of all C++ style comments to the supported C style comments
to allow us enforcing strict C90 compliance in a later commit.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge pull request #4699 from nelhage/fetch-null-dst</title>
<updated>2018-07-06T10:47:06+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2018-07-06T10:47:06+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=8a00de0899dcb71dca147acf7d47d19d27f63ba4'/>
<id>8a00de0899dcb71dca147acf7d47d19d27f63ba4</id>
<content type='text'>
git_refspec_transform: Handle NULL dst</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git_refspec_transform: Handle NULL dst</pre>
</div>
</content>
</entry>
<entry>
<title>formatting fix</title>
<updated>2018-06-29T16:18:36+00:00</updated>
<author>
<name>Nelson Elhage</name>
<email>nelhage@nelhage.com</email>
</author>
<published>2018-06-29T16:18:36+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=ff8edac946d662e282d127c1697c5a34d17a7af7'/>
<id>ff8edac946d662e282d127c1697c5a34d17a7af7</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>refspec: rename `git_refspec__free` to `git_refspec__dispose`</title>
<updated>2018-06-29T09:45:15+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2018-06-29T09:45:15+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=af3088e4642a0babb1cd26f5ed143f087f5a71f8'/>
<id>af3088e4642a0babb1cd26f5ed143f087f5a71f8</id>
<content type='text'>
Since commit 630a67366 (refspec: add public parsing api, 2018-02-07), we
now have two functions `git_refspec_free` and `git_refspec__free`. The
difference is that the first one will free the structure itself, while
the second one will only free the structure's contents. Use our new
`dispose` naming pattern for the latter function to help avoid
confusion.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since commit 630a67366 (refspec: add public parsing api, 2018-02-07), we
now have two functions `git_refspec_free` and `git_refspec__free`. The
difference is that the first one will free the structure itself, while
the second one will only free the structure's contents. Use our new
`dispose` naming pattern for the latter function to help avoid
confusion.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add a test.</title>
<updated>2018-06-25T15:47:31+00:00</updated>
<author>
<name>Nelson Elhage</name>
<email>nelhage@nelhage.com</email>
</author>
<published>2018-06-25T15:47:31+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=46c9f26fa450fba9f3099236aded871a56765764'/>
<id>46c9f26fa450fba9f3099236aded871a56765764</id>
<content type='text'>
Verified that this breaks before the fix and passes afterwards.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Verified that this breaks before the fix and passes afterwards.
</pre>
</div>
</content>
</entry>
<entry>
<title>refspec: add public parsing api</title>
<updated>2018-06-22T11:19:40+00:00</updated>
<author>
<name>cynecx</name>
<email>me@cynecx.net</email>
</author>
<published>2018-02-07T21:30:27+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=630a67366eb475003b46bf56dc06b90197458259'/>
<id>630a67366eb475003b46bf56dc06b90197458259</id>
<content type='text'>
Fix typo

Fix some type issues

More fixes

Address requested changes

Add test

Fix naming

Fix condition and tests

Address requested changes

Fix typo
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix typo

Fix some type issues

More fixes

Address requested changes

Add test

Fix naming

Fix condition and tests

Address requested changes

Fix typo
</pre>
</div>
</content>
</entry>
<entry>
<title>Convert usage of `git_buf_free` to new `git_buf_dispose`</title>
<updated>2018-06-10T17:34:37+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2018-02-08T11:14:48+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=ecf4f33a4e327a91496f72816f9f02d923e5af05'/>
<id>ecf4f33a4e327a91496f72816f9f02d923e5af05</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
