<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/builtin/worktree.c, branch v2.12.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.12.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.12.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2017-02-10T20:52:25Z</updated>
<entry>
<title>Merge branch 'ps/worktree-prune-help-fix'</title>
<updated>2017-02-10T20:52:25Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-02-10T20:52:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=65fecf0c08ceb5dd492281aa5894df64f898a118'/>
<id>urn:sha1:65fecf0c08ceb5dd492281aa5894df64f898a118</id>
<content type='text'>
Incorrect usage help message for "git worktree prune" has been fixed.

* ps/worktree-prune-help-fix:
  worktree: fix option descriptions for `prune`
</content>
</entry>
<entry>
<title>worktree: fix option descriptions for `prune`</title>
<updated>2017-02-06T18:59:25Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>patrick.steinhardt@elego.de</email>
</author>
<published>2017-02-06T13:13:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2488dcab22cee343fe35d9951160f0966a45fdb3'/>
<id>urn:sha1:2488dcab22cee343fe35d9951160f0966a45fdb3</id>
<content type='text'>
The `verbose` and `expire` options of the `git worktree prune`
subcommand have wrong descriptions in that they pretend to relate to
objects. But as the git-worktree(1) correctly states, these options have
nothing to do with objects but only with worktrees. Fix the description
accordingly.

Signed-off-by: Patrick Steinhardt &lt;patrick.steinhardt@elego.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>worktree list: keep the list sorted</title>
<updated>2016-11-28T21:18:51Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2016-11-28T09:36:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4df1d4d4666eb26b420d5b386010470729846b8c'/>
<id>urn:sha1:4df1d4d4666eb26b420d5b386010470729846b8c</id>
<content type='text'>
It makes it easier to write tests for. But it should also be good for
the user since locating a worktree by eye would be easier once they
notice this.

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: get_worktrees() takes a new flag argument</title>
<updated>2016-11-28T21:18:51Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2016-11-28T09:36:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4fff1ef7ffe0e370459242cf08c51177eeb4181f'/>
<id>urn:sha1:4fff1ef7ffe0e370459242cf08c51177eeb4181f</id>
<content type='text'>
This is another no-op patch, in preparation for get_worktrees() to do
optional things, like sorting.

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>get_worktrees() must return main worktree as first item even on error</title>
<updated>2016-11-28T21:18:51Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2016-11-28T09:36:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a234563a3b329c8513fabbe9d8f9435987f10eb6'/>
<id>urn:sha1:a234563a3b329c8513fabbe9d8f9435987f10eb6</id>
<content type='text'>
This is required by git-worktree.txt, stating that the main worktree is
the first line (especially in --porcelain mode when we can't just change
behavior at will).

There's only one case when get_worktrees() may skip main worktree, when
parse_ref() fails. Update the code so that we keep first item as main
worktree and return something sensible in this case:

 - In user-friendly mode, since we're not constraint by anything,
   returning "(error)" should do the job (we already show "(detached
   HEAD)" which is not machine-friendly). Actually errors should be
   printed on stderr by parse_ref() (*)

 - In plumbing mode, we do not show neither 'bare', 'detached' or
   'branch ...', which is possible by the format description if I read
   it right.

Careful readers may realize that when the local variable "head_ref" in
get_main_worktree() is emptied, add_head_info() will do nothing to
wt-&gt;head_sha1. But that's ok because head_sha1 is zero-ized in the
previous patch.

(*) Well, it does not. But it's supposed to be a stop gap implementation
    until we can reuse refs code to parse "ref: " stuff in HEAD, from
    resolve_refs_unsafe(). Now may be the time since refs refactoring is
    mostly done.

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: reorder an if statement</title>
<updated>2016-11-28T21:18:51Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2016-11-28T09:36:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=96f09e2a1100d78aacad80a741c3046031fda6b4'/>
<id>urn:sha1:96f09e2a1100d78aacad80a741c3046031fda6b4</id>
<content type='text'>
This is no-op. But it helps reduce diff noise in the next patch.

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: honor configuration variables</title>
<updated>2016-09-27T17:51:33Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-09-27T06:49:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d49028e6e7ad02a0fc2622487abc46312d9b42f4'/>
<id>urn:sha1:d49028e6e7ad02a0fc2622487abc46312d9b42f4</id>
<content type='text'>
The command accesses default_abbrev (defined in environment.c and is
updated via core.abbrev configuration), but never makes any call to
git_config().  The output from "worktree list" ignores the abbrev
setting for this reason.

Make a call to git_config() to read the default set of configuration
variables at the beginning of the command.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>use CHILD_PROCESS_INIT to initialize automatic variables</title>
<updated>2016-08-05T22:10:05Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2016-08-05T20:38:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=542aa25d9748c381a27074fb08614d4cb4713984'/>
<id>urn:sha1:542aa25d9748c381a27074fb08614d4cb4713984</id>
<content type='text'>
Initialize struct child_process variables already when they're defined.
That's shorter and saves a function call.

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>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>worktree: add "unlock" command</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:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6d308627cae4d34c058591de73ce14a52b79cf4e'/>
<id>urn:sha1:6d308627cae4d34c058591de73ce14a52b79cf4e</id>
<content type='text'>
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>
</feed>
