<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libgit2.git/tests/submodule, branch peff/binary-search-do-while</title>
<subtitle>github.com: libgit2/libgit2.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/'/>
<entry>
<title>repository: make check if repo is a worktree more strict</title>
<updated>2017-05-19T07:44:44+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2017-05-19T07:21:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=2696c5c3ece1a28c545d6e59b0d121480e9f977d'/>
<id>2696c5c3ece1a28c545d6e59b0d121480e9f977d</id>
<content type='text'>
To determine if a repository is a worktree or not, we currently check
for the existence of a "gitdir" file inside of the repository's gitdir.
While this is sufficient for non-broken repositories, we have at least
one case of a subtly broken repository where there exists a gitdir file
inside of a gitmodule. This will cause us to misidentify the submodule
as a worktree.

While this is not really a fault of ours, we can do better here by
observing that a repository can only ever be a worktree iff its common
directory and dotgit directory are different. This allows us to make our
check whether a repo is a worktree or not more strict by doing a simple
string comparison of these two directories. This will also allow us to
do the right thing in the above case of a broken repository, as for
submodules these directories will be the same. At the same time, this
allows us to skip the `stat` check for the "gitdir" file for most
repositories.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To determine if a repository is a worktree or not, we currently check
for the existence of a "gitdir" file inside of the repository's gitdir.
While this is sufficient for non-broken repositories, we have at least
one case of a subtly broken repository where there exists a gitdir file
inside of a gitmodule. This will cause us to misidentify the submodule
as a worktree.

While this is not really a fault of ours, we can do better here by
observing that a repository can only ever be a worktree iff its common
directory and dotgit directory are different. This allows us to make our
check whether a repo is a worktree or not more strict by doing a simple
string comparison of these two directories. This will also allow us to
do the right thing in the above case of a broken repository, as for
submodules these directories will be the same. At the same time, this
allows us to skip the `stat` check for the "gitdir" file for most
repositories.
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: add test suite for opening submodules</title>
<updated>2017-05-17T07:41:48+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2017-05-17T07:23:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=e526fbc703af90a651a3aeb0b3147df45dd0d44a'/>
<id>e526fbc703af90a651a3aeb0b3147df45dd0d44a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: provide better pass/failure error messages</title>
<updated>2017-02-17T12:58:57+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@github.com</email>
</author>
<published>2017-02-17T12:13:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=a1dcc83030f9073fe29054ecaf7647dca1fec2ec'/>
<id>a1dcc83030f9073fe29054ecaf7647dca1fec2ec</id>
<content type='text'>
Provide more detailed messages when conditions pass or fail
unexpectedly.  In particular, this provides the error messages when a
test fails with a different error code than was expected.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Provide more detailed messages when conditions pass or fail
unexpectedly.  In particular, this provides the error messages when a
test fails with a different error code than was expected.
</pre>
</div>
</content>
</entry>
<entry>
<title>Allow for caching of submodules.</title>
<updated>2017-01-20T22:33:56+00:00</updated>
<author>
<name>Brock Peabody</name>
<email>bpeabody@twosigma.com</email>
</author>
<published>2016-11-23T23:32:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=4d99c4cfc604bb141fd4e1423e934ebd3fb7e2a7'/>
<id>4d99c4cfc604bb141fd4e1423e934ebd3fb7e2a7</id>
<content type='text'>
Added `git_repository_submodule_cache_all` to initialze a cache of
submodules on the repository so that operations looking up N
submodules are O(N) and not O(N^2).  Added a
`git_repository_submodule_cache_clear` function to remove the cache.

Also optimized the function that loads all submodules as it was itself
O(N^2) w.r.t the number of submodules, having to loop through the
`.gitmodules` file once per submodule.  I changed it to process the
`.gitmodules` file once, into a map.

Signed-off-by: David Turner &lt;dturner@twosigma.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Added `git_repository_submodule_cache_all` to initialze a cache of
submodules on the repository so that operations looking up N
submodules are O(N) and not O(N^2).  Added a
`git_repository_submodule_cache_clear` function to remove the cache.

Also optimized the function that loads all submodules as it was itself
O(N^2) w.r.t the number of submodules, having to loop through the
`.gitmodules` file once per submodule.  I changed it to process the
`.gitmodules` file once, into a map.

Signed-off-by: David Turner &lt;dturner@twosigma.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>status: test submodules with mixed case</title>
<updated>2016-03-31T21:58:43+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@github.com</email>
</author>
<published>2016-03-31T21:33:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=74ab5f2cd010ffb824735402ebcd76895a975b4d'/>
<id>74ab5f2cd010ffb824735402ebcd76895a975b4d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>typos in comments</title>
<updated>2015-12-21T19:18:07+00:00</updated>
<author>
<name>Dmitriy Olshevskiy</name>
<email>olshevskiy87@bk.ru</email>
</author>
<published>2015-12-21T17:49:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=91f0d186b4efee8ccd5d0bbedf6b806a4f5e2a3a'/>
<id>91f0d186b4efee8ccd5d0bbedf6b806a4f5e2a3a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>submodule: test updating a submodule w/ a path</title>
<updated>2015-11-04T21:53:41+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@microsoft.com</email>
</author>
<published>2015-11-04T21:16:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=790012ce782e2b97e90e52ae9fdaff098b56b999'/>
<id>790012ce782e2b97e90e52ae9fdaff098b56b999</id>
<content type='text'>
Test that `git_submodule_update` can handle a submodule that is
freshly cloned and has a path differing from its name.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Test that `git_submodule_update` can handle a submodule that is
freshly cloned and has a path differing from its name.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge pull request #3434 from ethomson/reservednames</title>
<updated>2015-09-21T04:01:03+00:00</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>cmn@dwim.me</email>
</author>
<published>2015-09-21T04:01:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=aebddbe7367a16c8ac6cc5638ae46ba8063d2213'/>
<id>aebddbe7367a16c8ac6cc5638ae46ba8063d2213</id>
<content type='text'>
Win32 Reserved names: don't reserve names outside the working directory</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Win32 Reserved names: don't reserve names outside the working directory</pre>
</div>
</content>
</entry>
<entry>
<title>repo::reservedname: test a submodule update</title>
<updated>2015-09-18T16:17:49+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@microsoft.com</email>
</author>
<published>2015-09-17T21:49:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=e8ddd8d76c119903677b5d0c638c875023ae6784'/>
<id>e8ddd8d76c119903677b5d0c638c875023ae6784</id>
<content type='text'>
Test an initial submodule update, where we are trying to checkout
the submodule for the first time, and placing a file within the
submodule working directory with the same name as the submodule
(and consequently, the same name as the repository itself).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Test an initial submodule update, where we are trying to checkout
the submodule for the first time, and placing a file within the
submodule working directory with the same name as the submodule
(and consequently, the same name as the repository itself).
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix a couple of warnings</title>
<updated>2015-09-18T10:06:55+00:00</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>cmn@dwim.me</email>
</author>
<published>2015-09-18T10:06:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=dfe2856d0f3eb66e9199d28a73fab71cad0f3ff1'/>
<id>dfe2856d0f3eb66e9199d28a73fab71cad0f3ff1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
