<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libgit2.git/include/git2/worktree.h, branch ethomson/template</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>Merge pull request #4524 from pks-t/pks/worktree-refs</title>
<updated>2018-04-17T22:38:46+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2018-04-17T22:38:46+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=8529ac9b98e9d05c2616b855a497ee88c4f5c955'/>
<id>8529ac9b98e9d05c2616b855a497ee88c4f5c955</id>
<content type='text'>
worktree: add ability to create worktree with pre-existing branch</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
worktree: add ability to create worktree with pre-existing branch</pre>
</div>
</content>
</entry>
<entry>
<title>worktree: lock reason should be const</title>
<updated>2018-03-02T10:41:04+00:00</updated>
<author>
<name>Jacques Germishuys</name>
<email>jacquesg@striata.com</email>
</author>
<published>2018-03-02T10:41:04+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=123560764855067174ed48b652a49737a674f423'/>
<id>123560764855067174ed48b652a49737a674f423</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>worktree: add ability to create worktree with pre-existing branch</title>
<updated>2018-02-09T10:40:59+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2018-02-09T10:38:11+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=a22f19e6c4c0bf5205cd47dd66bfacd5c7d18136'/>
<id>a22f19e6c4c0bf5205cd47dd66bfacd5c7d18136</id>
<content type='text'>
Currently, we always create a new branch after the new worktree's name
when creating a worktree. In some workflows, though, the caller may want
to check out an already existing reference instead of creating a new
one, which is impossible to do right now.

Add a new option `ref` to the options structure for adding worktrees. In
case it is set, a branch and not already checked out by another
worktree, we will re-use this reference instead of creating a new one.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently, we always create a new branch after the new worktree's name
when creating a worktree. In some workflows, though, the caller may want
to check out an already existing reference instead of creating a new
one, which is impossible to do right now.

Add a new option `ref` to the options structure for adding worktrees. In
case it is set, a branch and not already checked out by another
worktree, we will re-use this reference instead of creating a new one.
</pre>
</div>
</content>
</entry>
<entry>
<title>worktree: upgrade lock to an int</title>
<updated>2017-06-04T21:44:30+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2017-06-04T21:44:30+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=f0848dd7e0d137939eb969af03bd75f9bf318286'/>
<id>f0848dd7e0d137939eb969af03bd75f9bf318286</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://91.123.203.49/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://91.123.203.49/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://91.123.203.49/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: 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://91.123.203.49/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>
<entry>
<title>worktree: extract git_worktree_is_prunable</title>
<updated>2017-02-13T10:13:08+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2017-02-03T12:52:23+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=1ba242c9ab0eb323abed1b3bbc770aeb3367d855'/>
<id>1ba242c9ab0eb323abed1b3bbc770aeb3367d855</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>worktree: implement functions reading HEAD</title>
<updated>2017-02-13T10:03:01+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2015-10-27T11:37:51+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=04fb12abb24810391fa19af5696eb38629d650df'/>
<id>04fb12abb24810391fa19af5696eb38629d650df</id>
<content type='text'>
Implement `git_repository_head_for_worktree` and
`git_repository_head_detached_for_worktree` for directly accessing a
worktree's HEAD without opening it as a `git_repository` first.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Implement `git_repository_head_for_worktree` and
`git_repository_head_detached_for_worktree` for directly accessing a
worktree's HEAD without opening it as a `git_repository` first.
</pre>
</div>
</content>
</entry>
</feed>
