{"thread":{"id":"47622","subject":"misleading \"man git-worktree\", is last \"add\" argument necessarily a \"branch\"?","startedAt":"2018-01-17T12:58:42Z","lastAt":"2018-01-17T18:32:39Z","messageCount":4,"participants":["Robert P. J. Day","Duy Nguyen","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"336696","messageId":"alpine.LFD.2.21.1801170455380.16166@localhost.localdomain","threadId":"47622","inReplyTo":null,"subject":"misleading \"man git-worktree\", is last \"add\" argument necessarily a \"branch\"?","fromName":"Robert P. J. Day","fromEmail":"rpjday@crashcourse.ca","sentAt":"2018-01-17T12:58:33Z","receivedAt":"2018-01-17T12:58:42Z","isPatch":false,"sender":{"key":"rpjday@crashcourse.ca","avatar":"https://avatars.githubusercontent.com/u/226084077?v=4"},"body":"\n  perusing \"git worktree\", and man page reads:\n\n  SYNOPSIS\n       git worktree add [-f] [--detach] [--checkout] [--lock]   \\\n                        [-b <new-branch>] <path> [<branch>]\n                                                 ^^^^^^^^^^\n\nhowever, can't that last optional argument be any arbitrary commit,\nnot just a \"branch\"?\n\nrday\n"},{"id":"336698","messageId":"CACsJy8A0BcdqwkDDd0Fx_8DDCgJc6gZaXkcYqysdv8BH1nvibQ@mail.gmail.com","threadId":"47622","inReplyTo":"alpine.LFD.2.21.1801170455380.16166@localhost.localdomain","subject":"Re: misleading \"man git-worktree\", is last \"add\" argument necessarily a \"branch\"?","fromName":"Duy Nguyen","fromEmail":"pclouds@gmail.com","sentAt":"2018-01-17T13:34:14Z","receivedAt":"2018-01-17T13:35:02Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Wed, Jan 17, 2018 at 7:58 PM, Robert P. J. Day <rpjday@crashcourse.ca> wrote:\n>\n>   perusing \"git worktree\", and man page reads:\n>\n>   SYNOPSIS\n>        git worktree add [-f] [--detach] [--checkout] [--lock]   \\\n>                         [-b <new-branch>] <path> [<branch>]\n>                                                  ^^^^^^^^^^\n>\n> however, can't that last optional argument be any arbitrary commit,\n> not just a \"branch\"?\n\nIt's been changed to commit-ish about two months ago in c4738aedc0\n(worktree: add can be created from any commit-ish - 2017-11-26)\n-- \nDuy\n"},{"id":"336699","messageId":"alpine.LFD.2.21.1801170541570.17204@localhost.localdomain","threadId":"47622","inReplyTo":"CACsJy8A0BcdqwkDDd0Fx_8DDCgJc6gZaXkcYqysdv8BH1nvibQ@mail.gmail.com","subject":"Re: misleading \"man git-worktree\", is last \"add\" argument necessarily a \"branch\"?","fromName":"Robert P. J. Day","fromEmail":"rpjday@crashcourse.ca","sentAt":"2018-01-17T13:42:14Z","receivedAt":"2018-01-17T13:42:55Z","isPatch":false,"sender":{"key":"rpjday@crashcourse.ca","avatar":"https://avatars.githubusercontent.com/u/226084077?v=4"},"body":"On Wed, 17 Jan 2018, Duy Nguyen wrote:\n\n> On Wed, Jan 17, 2018 at 7:58 PM, Robert P. J. Day <rpjday@crashcourse.ca> wrote:\n> >\n> >   perusing \"git worktree\", and man page reads:\n> >\n> >   SYNOPSIS\n> >        git worktree add [-f] [--detach] [--checkout] [--lock]   \\\n> >                         [-b <new-branch>] <path> [<branch>]\n> >                                                  ^^^^^^^^^^\n> >\n> > however, can't that last optional argument be any arbitrary commit,\n> > not just a \"branch\"?\n>\n> It's been changed to commit-ish about two months ago in c4738aedc0\n> (worktree: add can be created from any commit-ish - 2017-11-26)\n\n  guess i better update my repo, thanks.\n\nrday\n"},{"id":"336709","messageId":"xmqqh8rks5dr.fsf_-_@gitster.mtv.corp.google.com","threadId":"47622","inReplyTo":"CACsJy8A0BcdqwkDDd0Fx_8DDCgJc6gZaXkcYqysdv8BH1nvibQ@mail.gmail.com","subject":"Re* misleading \"man git-worktree\", is last \"add\" argument necessarily a \"branch\"?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-01-17T18:32:32Z","receivedAt":"2018-01-17T18:32:39Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Duy Nguyen <pclouds@gmail.com> writes:\n\n> On Wed, Jan 17, 2018 at 7:58 PM, Robert P. J. Day <rpjday@crashcourse.ca> wrote:\n>>\n>>   perusing \"git worktree\", and man page reads:\n>>\n>>   SYNOPSIS\n>>        git worktree add [-f] [--detach] [--checkout] [--lock]   \\\n>>                         [-b <new-branch>] <path> [<branch>]\n>>                                                  ^^^^^^^^^^\n>>\n>> however, can't that last optional argument be any arbitrary commit,\n>> not just a \"branch\"?\n>\n> It's been changed to commit-ish about two months ago in c4738aedc0\n> (worktree: add can be created from any commit-ish - 2017-11-26)\n\nIndeed \"git worktree --help\" is more up to date, but \"git worktree\n-h\" is stale.\n\n-- >8 --\nSubject: worktree: say that \"add\" takes an arbitrary commit in short-help\n\nc4738aed (\"worktree: add can be created from any commit-ish\",\n2017-11-26) taught \"git worktree add\" to start a new worktree\nwith an arbitrary commit-ish checked out, not limited to a tip\nof a branch.  \n\n\"git worktree --help\" was updated to describe this, but we forgot to\nupdate \"git worktree -h\".\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n builtin/worktree.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/builtin/worktree.c b/builtin/worktree.c\nindex 7cef5b120b..9efdc22466 100644\n--- a/builtin/worktree.c\n+++ b/builtin/worktree.c\n@@ -14,7 +14,7 @@\n #include \"worktree.h\"\n \n static const char * const worktree_usage[] = {\n-\tN_(\"git worktree add [<options>] <path> [<branch>]\"),\n+\tN_(\"git worktree add [<options>] <path> [<commit-ish>]\"),\n \tN_(\"git worktree list [<options>]\"),\n \tN_(\"git worktree lock [<options>] <path>\"),\n \tN_(\"git worktree prune [<options>]\"),\n\n\n"}]}