<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libgit2.git/tests/path, branch ethomson/github_actions</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>win32: introduce relative path handling function</title>
<updated>2020-03-10T20:10:20+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2020-03-08T18:11:45+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=f2b114ba828b561c63164dcfcc2707f11e31c8d8'/>
<id>f2b114ba828b561c63164dcfcc2707f11e31c8d8</id>
<content type='text'>
Add a function that takes a (possibly) relative UTF-8 path and emits a
UTF-16 path with forward slashes translated to backslashes.  If the
given path is, in fact, absolute, it will be translated to absolute path
handling rules.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a function that takes a (possibly) relative UTF-8 path and emits a
UTF-16 path with forward slashes translated to backslashes.  If the
given path is, in fact, absolute, it will be translated to absolute path
handling rules.
</pre>
</div>
</content>
</entry>
<entry>
<title>win32: clarify usage of path canonicalization funcs</title>
<updated>2020-03-08T18:23:29+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2020-03-08T16:34:23+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=fb7da15452f7069e6bfa7d39b7703e32eaa84d34'/>
<id>fb7da15452f7069e6bfa7d39b7703e32eaa84d34</id>
<content type='text'>
The path canonicalization functions on win32 are intended to
canonicalize absolute paths; those with prefixes.  In other words,
things start with drive letters (`C:\`), share names (`\\server\share`),
or other prefixes (`\\?\`).

This function removes leading `..` that occur after the prefix but
before the directory/file portion (eg, turning `C:\..\..\..\foo` into
`C:\foo`).  This translation is not appropriate for local paths.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The path canonicalization functions on win32 are intended to
canonicalize absolute paths; those with prefixes.  In other words,
things start with drive letters (`C:\`), share names (`\\server\share`),
or other prefixes (`\\?\`).

This function removes leading `..` that occur after the prefix but
before the directory/file portion (eg, turning `C:\..\..\..\foo` into
`C:\foo`).  This translation is not appropriate for local paths.
</pre>
</div>
</content>
</entry>
<entry>
<title>path: support non-ascii drive letters on dos</title>
<updated>2019-12-10T08:11:45+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2019-12-03T12:15:47+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=14ff3516e5f4203838a0edb044c6622b8e3a3755'/>
<id>14ff3516e5f4203838a0edb044c6622b8e3a3755</id>
<content type='text'>
Windows/DOS only supports drive letters that are alpha characters A-Z.
However, you can `subst` any one-character as a drive letter, including
numbers or even emoji.  Test that we can identify emoji as drive
letters.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Windows/DOS only supports drive letters that are alpha characters A-Z.
However, you can `subst` any one-character as a drive letter, including
numbers or even emoji.  Test that we can identify emoji as drive
letters.
</pre>
</div>
</content>
</entry>
<entry>
<title>path: also guard `.gitmodules` against NTFS Alternate Data Streams</title>
<updated>2019-12-10T08:01:06+00:00</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2019-09-18T14:33:18+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=e1832eb20a7089f6383cfce474f213157f5300cb'/>
<id>e1832eb20a7089f6383cfce474f213157f5300cb</id>
<content type='text'>
We just safe-guarded `.git` against NTFS Alternate Data Stream-related
attack vectors, and now it is time to do the same for `.gitmodules`.

Note: In the added regression test, we refrain from verifying all kinds
of variations between short names and NTFS Alternate Data Streams: as
the new code disallows _all_ Alternate Data Streams of `.gitmodules`, it
is enough to test one in order to know that all of them are guarded
against.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We just safe-guarded `.git` against NTFS Alternate Data Stream-related
attack vectors, and now it is time to do the same for `.gitmodules`.

Note: In the added regression test, we refrain from verifying all kinds
of variations between short names and NTFS Alternate Data Streams: as
the new code disallows _all_ Alternate Data Streams of `.gitmodules`, it
is enough to test one in order to know that all of them are guarded
against.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>path: only treat paths starting with '\' as absolute on Win32</title>
<updated>2019-06-13T08:41:15+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2019-06-07T08:20:35+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=f7c6795f48850eec94793d22b5fd621b61cd2466'/>
<id>f7c6795f48850eec94793d22b5fd621b61cd2466</id>
<content type='text'>
Windows-based systems treat paths starting with '\' as absolute,
either referring to the current drive's root (e.g. "\foo" might
refer to "C:\foo") or to a network path (e.g. "\\host\foo"). On
the other hand, (most?) systems that are not based on Win32
accept backslashes as valid characters that may be part of the
filename, and thus we cannot treat them to identify absolute
paths.

Change the logic to only paths starting with '\' as absolute on
the Win32 platform. Add tests to avoid regressions and document
behaviour.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Windows-based systems treat paths starting with '\' as absolute,
either referring to the current drive's root (e.g. "\foo" might
refer to "C:\foo") or to a network path (e.g. "\\host\foo"). On
the other hand, (most?) systems that are not based on Win32
accept backslashes as valid characters that may be part of the
filename, and thus we cannot treat them to identify absolute
paths.

Change the logic to only paths starting with '\' as absolute on
the Win32 platform. Add tests to avoid regressions and document
behaviour.
</pre>
</div>
</content>
</entry>
<entry>
<title>Attempt at fixing the MingW64 compilation</title>
<updated>2019-01-06T16:29:56+00:00</updated>
<author>
<name>lhchavez</name>
<email>lhchavez@lhchavez.com</email>
</author>
<published>2019-01-06T16:29:56+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=b5e8272fdcab4e7f238a72d0b9c9fc9c753fd381'/>
<id>b5e8272fdcab4e7f238a72d0b9c9fc9c753fd381</id>
<content type='text'>
It seems like MingW64's size_t is defined differently than in Linux.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It seems like MingW64's size_t is defined differently than in Linux.
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: path: only compile test_canonicalize on Win32 platforms</title>
<updated>2018-11-28T14:22:27+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2018-11-21T10:20:14+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=bbf9f5a78e42da9a7382c685dfa821589a7c6485'/>
<id>bbf9f5a78e42da9a7382c685dfa821589a7c6485</id>
<content type='text'>
The function `test_canonicalize` is only used on Win32 platforms. It will thus
result in an unused function warning if these warnings are enabled and one is on
a platform different than Win32.

Fix the issue by only compiling in the function on Win32 platforms.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The function `test_canonicalize` is only used on Win32 platforms. It will thus
result in an unused function warning if these warnings are enabled and one is on
a platform different than Win32.

Fix the issue by only compiling in the function on Win32 platforms.
</pre>
</div>
</content>
</entry>
<entry>
<title>win32: more tests for `git_win32_remove_path`</title>
<updated>2018-10-19T06:26:17+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2018-10-17T18:34:38+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=16fd9ba9379c0cbf0931f9486980353b5a28fda9'/>
<id>16fd9ba9379c0cbf0931f9486980353b5a28fda9</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>win32: rename `git_win32__canonicalize_path`</title>
<updated>2018-10-19T06:26:17+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2018-10-17T15:48:43+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=b2e85f982709b1dee4ab7206f83d56352b165e82'/>
<id>b2e85f982709b1dee4ab7206f83d56352b165e82</id>
<content type='text'>
The internal API `git_win32__canonicalize_path` is far, far too easily
confused with the internal API `git_win32_path_canonicalize`.  The
former removes the namespace prefix from a path (eg, given
`\\?\C:\Temp\foo`, it returns `C:\Temp\foo`, and given
`\\?\UNC\server\share`, it returns `\\server\share`).  As such, rename
it to `git_win32_path_remove_namespace`.

`git_win32_path_canonicalize` remains unchanged.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The internal API `git_win32__canonicalize_path` is far, far too easily
confused with the internal API `git_win32_path_canonicalize`.  The
former removes the namespace prefix from a path (eg, given
`\\?\C:\Temp\foo`, it returns `C:\Temp\foo`, and given
`\\?\UNC\server\share`, it returns `\\server\share`).  As such, rename
it to `git_win32_path_remove_namespace`.

`git_win32_path_canonicalize` remains unchanged.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix comment style and update test code</title>
<updated>2018-10-04T20:03:25+00:00</updated>
<author>
<name>Gabriel DeBacker</name>
<email>6741868+GabeDeBacker@users.noreply.github.com</email>
</author>
<published>2018-10-04T20:03:25+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=3f096ca56affd4870f6c3a5c1c045d2fb100de0d'/>
<id>3f096ca56affd4870f6c3a5c1c045d2fb100de0d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
