Merge branch 'es/worktree-add'
authorJunio C Hamano <gitster@pobox.com>
Mon, 13 Jul 2015 21:02:18 +0000 (14:02 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 13 Jul 2015 21:02:19 +0000 (14:02 -0700)
Update to the "linked checkout" in 2.5.0-rc1.

Instead of "checkout --to" that does not do what "checkout"
normally does, move the functionality to "git worktree add".

* es/worktree-add: (24 commits)
Revert "checkout: retire --ignore-other-worktrees in favor of --force"
checkout: retire --ignore-other-worktrees in favor of --force
worktree: add: auto-vivify new branch when <branch> is omitted
worktree: add: make -b/-B default to HEAD when <branch> is omitted
worktree: extract basename computation to new function
checkout: require worktree unconditionally
checkout: retire --to option
tests: worktree: retrofit "checkout --to" tests for "worktree add"
worktree: add -b/-B options
worktree: add --detach option
worktree: add --force option
worktree: introduce "add" command
checkout: drop 'checkout_opts' dependency from prepare_linked_checkout
checkout: make --to unconditionally verbose
checkout: prepare_linked_checkout: drop now-unused 'new' argument
checkout: relocate --to's "no branch specified" check
checkout: fix bug with --to and relative HEAD
Documentation/git-worktree: add EXAMPLES section
Documentation/git-worktree: add high-level 'lock' overview
Documentation/git-worktree: split technical info from general description
...

1  2 
Documentation/git-checkout.txt
builtin/checkout.c
builtin/worktree.c
git.c
Simple merge
index e227f649955a21647381ee322af65322b075b80d,57545543ebcc46ef28ca4a22d399b5476de7af0b..f71844a23a9d4bda0664bec709648911bc0f2609
  #include "ll-merge.h"
  #include "resolve-undo.h"
  #include "submodule.h"
- #include "argv-array.h"
- #include "sigchain.h"
  
  static const char * const checkout_usage[] = {
 -      N_("git checkout [options] <branch>"),
 -      N_("git checkout [options] [<branch>] -- <file>..."),
 +      N_("git checkout [<options>] <branch>"),
 +      N_("git checkout [<options>] [<branch>] -- <file>..."),
        NULL,
  };
  
@@@ -1364,9 -1197,7 +1222,7 @@@ int cmd_checkout(int argc, const char *
                OPT_BOOL(0, "ignore-skip-worktree-bits", &opts.ignore_skipworktree,
                         N_("do not limit pathspecs to sparse entries only")),
                OPT_HIDDEN_BOOL(0, "guess", &dwim_new_local_branch,
 -                              N_("second guess 'git checkout no-such-branch'")),
 +                              N_("second guess 'git checkout <no-such-branch>'")),
-               OPT_FILENAME(0, "to", &opts.new_worktree,
-                          N_("check a branch out in a separate working directory")),
                OPT_BOOL(0, "ignore-other-worktrees", &opts.ignore_other_worktrees,
                         N_("do not check if another worktree is holding the given ref")),
                OPT_END(),
index 2a729c661cd3747ee345c8491dfc8ff540ee9c0f,69248ba0a352de82f59a117b9ba4ed4e6af74a4d..6a264ee749221cd6c6bf98ce68790bdec3dd82c5
@@@ -2,8 -2,12 +2,13 @@@
  #include "builtin.h"
  #include "dir.h"
  #include "parse-options.h"
+ #include "argv-array.h"
+ #include "run-command.h"
+ #include "sigchain.h"
++#include "refs.h"
  
  static const char * const worktree_usage[] = {
+       N_("git worktree add [<options>] <path> <branch>"),
        N_("git worktree prune [<options>]"),
        NULL
  };
diff --cc git.c
Simple merge