<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/worktree.c, branch v2.10.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.10.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.10.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2016-10-14T16:58:58Z</updated>
<entry>
<title>worktree: allow the main brach of a bare repository to be checked out</title>
<updated>2016-10-14T16:58:58Z</updated>
<author>
<name>Dennis Kaarsemaker</name>
<email>dennis@kaarsemaker.net</email>
</author>
<published>2016-10-12T16:41:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=171c646f8c6484cca76933ebe8a6af52df47277d'/>
<id>urn:sha1:171c646f8c6484cca76933ebe8a6af52df47277d</id>
<content type='text'>
In bare repositories, get_worktrees() still returns the main repository,
so git worktree list can show it. ignore it in find_shared_symref so we
can still check out the main branch.

Signed-off-by: Dennis Kaarsemaker &lt;dennis@kaarsemaker.net&gt;
Acked-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'nd/worktree-lock'</title>
<updated>2016-07-28T17:34:42Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-07-28T17:34:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2c608e0f7c1f0fb9fb3e42eb737d7b8543e11400'/>
<id>urn:sha1:2c608e0f7c1f0fb9fb3e42eb737d7b8543e11400</id>
<content type='text'>
"git worktree prune" protected worktrees that are marked as
"locked" by creating a file in a known location.  "git worktree"
command learned a dedicated command pair to create and remove such
a file, so that the users do not have to do this with editor.

* nd/worktree-lock:
  worktree.c: find_worktree() search by path suffix
  worktree: add "unlock" command
  worktree: add "lock" command
  worktree.c: add is_worktree_locked()
  worktree.c: add is_main_worktree()
  worktree.c: add find_worktree()
</content>
</entry>
<entry>
<title>Merge branch 'rs/worktree-use-strbuf-absolute-path'</title>
<updated>2016-07-25T21:13:37Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-07-25T21:13:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fc08d2d4add543b88d7e1573cb4be01adedfed00'/>
<id>urn:sha1:fc08d2d4add543b88d7e1573cb4be01adedfed00</id>
<content type='text'>
Code simplification.

* rs/worktree-use-strbuf-absolute-path:
  worktree: use strbuf_add_absolute_path() directly
</content>
</entry>
<entry>
<title>worktree: use strbuf_add_absolute_path() directly</title>
<updated>2016-07-12T22:11:01Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2016-07-09T15:43:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fd2e7dafdeef4e9ba3c023427deb4e21ba5b31a8'/>
<id>urn:sha1:fd2e7dafdeef4e9ba3c023427deb4e21ba5b31a8</id>
<content type='text'>
absolute_path() is a wrapper for strbuf_add_absolute_path().  Call the
latter directly for adding absolute paths to a strbuf.  That's shorter
and avoids an extra string copy.

Signed-off-by: Rene Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>worktree.c: find_worktree() search by path suffix</title>
<updated>2016-07-08T22:31:04Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2016-06-13T12:18:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=080739ba1db7897dde53427937acc011ea98a006'/>
<id>urn:sha1:080739ba1db7897dde53427937acc011ea98a006</id>
<content type='text'>
This allows the user to do something like "worktree lock foo" or
"worktree lock to/foo" instead of "worktree lock /long/path/to/foo" if
it's unambiguous.

With completion support it could be quite convenient. While this base
name search can be done in the same worktree iteration loop, the code is
split into a separate function for clarity.

Suggested-by: Eric Sunshine &lt;sunshine@sunshineco.com&gt;
Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'nd/worktree-cleanup-post-head-protection'</title>
<updated>2016-07-06T20:38:11Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-07-06T20:38:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7a738b40f67fc44c2a2c1abcffe474241af3d30e'/>
<id>urn:sha1:7a738b40f67fc44c2a2c1abcffe474241af3d30e</id>
<content type='text'>
Further preparatory clean-up for "worktree" feature continues.

* nd/worktree-cleanup-post-head-protection:
  worktree: simplify prefixing paths
  worktree: avoid 0{40}, too many zeroes, hard to read
  worktree.c: use is_dot_or_dotdot()
  git-worktree.txt: keep subcommand listing in alphabetical order
  worktree.c: rewrite mark_current_worktree() to avoid strbuf
  completion: support git-worktree
</content>
</entry>
<entry>
<title>worktree.c: add is_worktree_locked()</title>
<updated>2016-06-13T18:53:14Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2016-06-13T12:18:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=346ef53058ef25f5a7273ee77c03ebc5f732ad77'/>
<id>urn:sha1:346ef53058ef25f5a7273ee77c03ebc5f732ad77</id>
<content type='text'>
We need this later to avoid double locking a worktree, or unlocking one
when it's not even locked.

Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>worktree.c: add is_main_worktree()</title>
<updated>2016-06-04T04:58:35Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2016-06-03T12:19:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=984ad9e56c9d884f7f1aa7d6b2052f3fb082ee5d'/>
<id>urn:sha1:984ad9e56c9d884f7f1aa7d6b2052f3fb082ee5d</id>
<content type='text'>
Main worktree _is_ different. You can lock (*) a linked worktree but not
the main one, for example. Provide an API for checking that.

(*) Add the file $GIT_DIR/worktrees/xxx/locked to avoid worktree xxx
from being removed or moved.

Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>worktree.c: add find_worktree()</title>
<updated>2016-06-04T04:58:18Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2016-06-03T12:19:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6835314459794831a1b88bed56549653710e910c'/>
<id>urn:sha1:6835314459794831a1b88bed56549653710e910c</id>
<content type='text'>
So far we haven't needed to identify an existing worktree from command
line. Future commands such as lock or move will need it. The current
implementation identifies worktrees by path (*). In future, the function
could learn to identify by $(basename $path) or tags...

(*) We could probably go cheaper with comparing inode number (and
probably more reliable than paths when unicode enters the game). But not
all systems have good inode that so let's stick to something simple for
now.

Helped-by: Eric Sunshine &lt;sunshine@sunshineco.com&gt;
Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>worktree.c: use is_dot_or_dotdot()</title>
<updated>2016-05-24T20:19:22Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2016-05-22T09:33:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=afb9e30b2cadfa010975b29e0ff7459d4b7ae953'/>
<id>urn:sha1:afb9e30b2cadfa010975b29e0ff7459d4b7ae953</id>
<content type='text'>
Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Reviewed-by: Eric Sunshine &lt;sunshine@sunshineco.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
