<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libgit2.git/src/submodule.c, branch ethomson/read_prefix</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>Merge pull request #4163 from pks-t/pks/submodules-with-worktrees</title>
<updated>2017-03-22T20:32:55+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2017-03-22T20:32:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=f623cf894a7e2591e7b4424b24143d1a7584cf9e'/>
<id>f623cf894a7e2591e7b4424b24143d1a7584cf9e</id>
<content type='text'>
Worktree fixes</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Worktree fixes</pre>
</div>
</content>
</entry>
<entry>
<title>submodule: resolve URLs relative to main worktree</title>
<updated>2017-03-17T08:27:56+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2017-03-15T12:38:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=b0c9bc920fabfd814946d555738ac7ba042154d7'/>
<id>b0c9bc920fabfd814946d555738ac7ba042154d7</id>
<content type='text'>
It is possible to specify submodule URLs relative to the repository
location. E.g. having a submodule with URL "../submodule" will look for
the submodule at "repo/../submodule".

With the introduction of worktrees, though, we cannot simply resolve the
URL relative to the repository location itself. If the repository for
which a URL is to be resolved is a working tree, we have to resolve the
URL relative to the parent's repository path. Otherwise, the URL would
change depending on where the working tree is located.

Fix this by special-casing when we have a working tree while getting the
URL base.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It is possible to specify submodule URLs relative to the repository
location. E.g. having a submodule with URL "../submodule" will look for
the submodule at "repo/../submodule".

With the introduction of worktrees, though, we cannot simply resolve the
URL relative to the repository location itself. If the repository for
which a URL is to be resolved is a working tree, we have to resolve the
URL relative to the parent's repository path. Otherwise, the URL would
change depending on where the working tree is located.

Fix this by special-casing when we have a working tree while getting the
URL base.
</pre>
</div>
</content>
</entry>
<entry>
<title>submodule: catch when submodule is not staged on update</title>
<updated>2017-03-14T13:53:32+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2017-03-14T13:53:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=32ecc98e51ab73a7db49dfb178ea670e6f68321b'/>
<id>32ecc98e51ab73a7db49dfb178ea670e6f68321b</id>
<content type='text'>
When calling `git_submodule_update` on a submodule, we have to retrieve
the ID of the submodule entry in the index. If the function is called on
a submodule which is only partly initialized, the submodule entry may
not be added to the index yet. This leads to an assert when trying to
look up the blob later on.

Fix the issue by checking if the index actually holds the submodule's
ID and erroring out if it does not.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When calling `git_submodule_update` on a submodule, we have to retrieve
the ID of the submodule entry in the index. If the function is called on
a submodule which is only partly initialized, the submodule entry may
not be added to the index yet. This leads to an assert when trying to
look up the blob later on.

Fix the issue by checking if the index actually holds the submodule's
ID and erroring out if it does not.
</pre>
</div>
</content>
</entry>
<entry>
<title>khash: avoid using macro magic to get return address</title>
<updated>2017-02-17T10:41:06+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2017-01-27T13:20:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=73028af85c11bd947184a73c1e2d7902819695b2'/>
<id>73028af85c11bd947184a73c1e2d7902819695b2</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>khash: avoid using `kh_put` directly</title>
<updated>2017-02-17T10:41:06+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2017-01-25T14:31:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=f31cb45ad2ca46cc743dfadf5ac8b916cbe4ea9c'/>
<id>f31cb45ad2ca46cc743dfadf5ac8b916cbe4ea9c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>khash: avoid using `kh_size` directly</title>
<updated>2017-02-17T10:41:06+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2017-01-25T13:05:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=63e914cbf4e6cb07d39b5a6f31749f78247ff594'/>
<id>63e914cbf4e6cb07d39b5a6f31749f78247ff594</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>repository: use `git_repository_item_path`</title>
<updated>2017-02-13T09:28:15+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2016-11-11T13:36:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=c5f3da9692f8de15550fed47e377c586f99f7c5a'/>
<id>c5f3da9692f8de15550fed47e377c586f99f7c5a</id>
<content type='text'>
The recent introduction of the commondir variable of a repository
requires callers to distinguish whether their files are part of
the dot-git directory or the common directory shared between
multpile worktrees. In order to take the burden from callers and
unify knowledge on which files reside where, the
`git_repository_item_path` function has been introduced which
encapsulate this knowledge.

Modify most existing callers of `git_repository_path` to use
`git_repository_item_path` instead, thus making them implicitly
aware of the common directory.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The recent introduction of the commondir variable of a repository
requires callers to distinguish whether their files are part of
the dot-git directory or the common directory shared between
multpile worktrees. In order to take the burden from callers and
unify knowledge on which files reside where, the
`git_repository_item_path` function has been introduced which
encapsulate this knowledge.

Modify most existing callers of `git_repository_path` to use
`git_repository_item_path` instead, thus making them implicitly
aware of the common directory.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix uninitialized variable warning</title>
<updated>2017-01-27T17:49:48+00:00</updated>
<author>
<name>Matthew Plough</name>
<email>matt@arena.io</email>
</author>
<published>2017-01-27T17:49:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=d0c418c0bb150cce670bbfd1d9343f91f894125a'/>
<id>d0c418c0bb150cce670bbfd1d9343f91f894125a</id>
<content type='text'>
Fix the following warning emitted by clang:
[ 16%] Building C object CMakeFiles/libgit2_clar.dir/src/submodule.c.o
/Users/mplough/devel/external/libgit2/src/submodule.c:408:6: warning: variable 'i' is used uninitialized whenever 'if' condition is true
      [-Wsometimes-uninitialized]
        if ((error = load_submodule_names(names, cfg)))
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/mplough/devel/external/libgit2/src/submodule.c:448:20: note: uninitialized use occurs here
        git_iterator_free(i);
                          ^
/Users/mplough/devel/external/libgit2/src/submodule.c:408:2: note: remove the 'if' if its condition is always false
        if ((error = load_submodule_names(names, cfg)))
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/mplough/devel/external/libgit2/src/submodule.c:404:17: note: initialize the variable 'i' to silence this warning
        git_iterator *i;
                       ^
                        = NULL
1 warning generated.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix the following warning emitted by clang:
[ 16%] Building C object CMakeFiles/libgit2_clar.dir/src/submodule.c.o
/Users/mplough/devel/external/libgit2/src/submodule.c:408:6: warning: variable 'i' is used uninitialized whenever 'if' condition is true
      [-Wsometimes-uninitialized]
        if ((error = load_submodule_names(names, cfg)))
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/mplough/devel/external/libgit2/src/submodule.c:448:20: note: uninitialized use occurs here
        git_iterator_free(i);
                          ^
/Users/mplough/devel/external/libgit2/src/submodule.c:408:2: note: remove the 'if' if its condition is always false
        if ((error = load_submodule_names(names, cfg)))
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/mplough/devel/external/libgit2/src/submodule.c:404:17: note: initialize the variable 'i' to silence this warning
        git_iterator *i;
                       ^
                        = NULL
1 warning generated.
</pre>
</div>
</content>
</entry>
<entry>
<title>submodule: only examine idx &amp; head given a config</title>
<updated>2017-01-23T22:29:57+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@github.com</email>
</author>
<published>2017-01-22T00:58:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=60c2bf47e40d86f1fcf9b9b928666ed2b06d0e4d'/>
<id>60c2bf47e40d86f1fcf9b9b928666ed2b06d0e4d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>submodule: don't double free during load failure</title>
<updated>2017-01-23T22:24:40+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@github.com</email>
</author>
<published>2017-01-22T00:30:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=0fbff82b579ae4bb764a293e9f4ef543c549ba2b'/>
<id>0fbff82b579ae4bb764a293e9f4ef543c549ba2b</id>
<content type='text'>
When we fail to load submodules, don't free the list; it is later freed
unconditionally.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When we fail to load submodules, don't free the list; it is later freed
unconditionally.
</pre>
</div>
</content>
</entry>
</feed>
