<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libgit2.git/src/worktree.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>worktree: use `git__free` instead of `free`</title>
<updated>2017-06-08T10:05:35+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2017-06-06T12:54:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=9be4c3039a03be75de17ae82d3e72fe44f7aec7d'/>
<id>9be4c3039a03be75de17ae82d3e72fe44f7aec7d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>worktree: switch over worktree pruning to an opts structure</title>
<updated>2017-05-05T13:39:25+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2017-05-02T10:35:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=883eeb5f909f230822c0bc025d3f9ce79781de04'/>
<id>883eeb5f909f230822c0bc025d3f9ce79781de04</id>
<content type='text'>
The current signature of `git_worktree_prune` accepts a flags field to
alter its behavior. This is not as flexible as we'd like it to be when
we want to enable passing additional options in the future. As the
function has not been part of any release yet, we are still free to
alter its current signature. This commit does so by using our usual
pattern of an options structure, which is easily extendable without
breaking the API.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The current signature of `git_worktree_prune` accepts a flags field to
alter its behavior. This is not as flexible as we'd like it to be when
we want to enable passing additional options in the future. As the
function has not been part of any release yet, we are still free to
alter its current signature. This commit does so by using our usual
pattern of an options structure, which is easily extendable without
breaking the API.
</pre>
</div>
</content>
</entry>
<entry>
<title>worktree: support creating locked worktrees</title>
<updated>2017-05-05T13:39:25+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2017-05-02T08:11:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=8264a30f4fbfce96f433f01fa6fe537e5cb3570d'/>
<id>8264a30f4fbfce96f433f01fa6fe537e5cb3570d</id>
<content type='text'>
When creating a new worktree, we do have a potential race with us
creating the worktree and another process trying to delete the same
worktree as it is being created. As such, the upstream git project has
introduced a flag `git worktree add --locked`, which will cause the
newly created worktree to be locked immediately after its creation. This
mitigates the race condition.

We want to be able to mirror the same behavior. As such, a new flag
`locked` is added to the options structure of `git_worktree_add` which
allows the user to enable this behavior.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When creating a new worktree, we do have a potential race with us
creating the worktree and another process trying to delete the same
worktree as it is being created. As such, the upstream git project has
introduced a flag `git worktree add --locked`, which will cause the
newly created worktree to be locked immediately after its creation. This
mitigates the race condition.

We want to be able to mirror the same behavior. As such, a new flag
`locked` is added to the options structure of `git_worktree_add` which
allows the user to enable this behavior.
</pre>
</div>
</content>
</entry>
<entry>
<title>worktree: introduce git_worktree_add options</title>
<updated>2017-05-02T10:39:29+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2017-05-02T08:02:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=a7aa73a535a7f21357e9c7dece8376f30a29681f'/>
<id>a7aa73a535a7f21357e9c7dece8376f30a29681f</id>
<content type='text'>
The `git_worktree_add` function currently accepts only a path and name
for the new work tree. As we may want to expand these parameters in
future versions without adding additional parameters to the function for
every option, this commit introduces our typical pattern of an options
struct. Right now, this structure is still empty, which will change with
the next commit.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The `git_worktree_add` function currently accepts only a path and name
for the new work tree. As we may want to expand these parameters in
future versions without adding additional parameters to the function for
every option, this commit introduces our typical pattern of an options
struct. Right now, this structure is still empty, which will change with
the next commit.
</pre>
</div>
</content>
</entry>
<entry>
<title>worktree: unconditionally free the worktree's name</title>
<updated>2017-03-24T08:26:31+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2017-03-24T08:26:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=fbdf2a79d5b6f3f4c9a7abdd971f9f3cb133e157'/>
<id>fbdf2a79d5b6f3f4c9a7abdd971f9f3cb133e157</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>worktree: write resolved paths into link files</title>
<updated>2017-03-17T08:27:56+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2017-03-17T07:13:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=8f154be3eb04c44755e7b0a5020dc9b82c0c1f24'/>
<id>8f154be3eb04c44755e7b0a5020dc9b82c0c1f24</id>
<content type='text'>
The three link files "worktree/.git", ".git/worktrees/&lt;name&gt;/commondir"
and ".git/worktrees/&lt;name&gt;/gitdir" should always contain absolute and
resolved paths. Adjust the logic creating new worktrees to first use
`git_path_prettify_dir` before writing out these files, so that paths
are resolved first.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The three link files "worktree/.git", ".git/worktrees/&lt;name&gt;/commondir"
and ".git/worktrees/&lt;name&gt;/gitdir" should always contain absolute and
resolved paths. Adjust the logic creating new worktrees to first use
`git_path_prettify_dir` before writing out these files, so that paths
are resolved first.
</pre>
</div>
</content>
</entry>
<entry>
<title>worktree: rename variable in `git_worktree_add`</title>
<updated>2017-03-17T08:27:56+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2017-03-17T07:06:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=7cf7a407497dab6978ca6b8fc68713e2a50eb803'/>
<id>7cf7a407497dab6978ca6b8fc68713e2a50eb803</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>worktree: use fully qualified reference name for created HEAD</title>
<updated>2017-03-17T08:27:55+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2017-03-15T15:35:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=9dcc79bc6a6ef9d0704e598c38e2e98cd4f41f30'/>
<id>9dcc79bc6a6ef9d0704e598c38e2e98cd4f41f30</id>
<content type='text'>
When creating a new worktree, we have to set up the initial data
structures. Next to others, this also includes the HEAD pseudo-ref.
We currently set it to the worktree respectively branch name, which is
actually not fully qualified.

Use the fully qualified branch name instead.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When creating a new worktree, we have to set up the initial data
structures. Next to others, this also includes the HEAD pseudo-ref.
We currently set it to the worktree respectively branch name, which is
actually not fully qualified.

Use the fully qualified branch name instead.
</pre>
</div>
</content>
</entry>
<entry>
<title>worktree: parent path should point to the working dir</title>
<updated>2017-03-17T08:27:55+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2017-03-15T14:29:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=20a368e2d72e65b6401f18a440c24df0dd9683ae'/>
<id>20a368e2d72e65b6401f18a440c24df0dd9683ae</id>
<content type='text'>
The working tree's parent path should not point to the parent's gitdir,
but to the parent's working directory. Pointing to the gitdir would not
make any sense, as the parent's working directory is actually equal to
both repository's common directory.

Fix the issue.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The working tree's parent path should not point to the parent's gitdir,
but to the parent's working directory. Pointing to the gitdir would not
make any sense, as the parent's working directory is actually equal to
both repository's common directory.

Fix the issue.
</pre>
</div>
</content>
</entry>
<entry>
<title>worktree: implement `git_worktree_open_from_repository`</title>
<updated>2017-03-17T08:26:13+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2017-03-15T13:24:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=3017ba94a33a5dae07521afd96a94e21afb07b8c'/>
<id>3017ba94a33a5dae07521afd96a94e21afb07b8c</id>
<content type='text'>
While we already provide functionality to look up a worktree from a
repository, we cannot do so the other way round. That is given a
repository, we want to look up its worktree if it actually exists.
Getting the worktree of a repository is useful when we want to get
certain meta information like the parent's location, getting the locked
status, etc.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While we already provide functionality to look up a worktree from a
repository, we cannot do so the other way round. That is given a
repository, we want to look up its worktree if it actually exists.
Getting the worktree of a repository is useful when we want to get
certain meta information like the parent's location, getting the locked
status, etc.
</pre>
</div>
</content>
</entry>
</feed>
