Merge branch 'nd/worktree-move'

"git worktree" learned move and remove subcommands.

* nd/worktree-move:
  t2028: fix minor error and issues in newly-added "worktree move" tests
  worktree remove: allow it when $GIT_WORK_TREE is already gone
  worktree remove: new command
  worktree move: refuse to move worktrees with submodules
  worktree move: accept destination as directory
  worktree move: new command
  worktree.c: add update_worktree_location()
  worktree.c: add validate_worktree()
This commit is contained in:
Junio C Hamano
2018-03-14 12:01:05 -07:00
8 changed files with 452 additions and 17 deletions

View File

@ -3087,7 +3087,7 @@ _git_whatchanged ()
_git_worktree ()
{
local subcommands="add list lock prune unlock"
local subcommands="add list lock move prune remove unlock"
local subcommand="$(__git_find_on_cmdline "$subcommands")"
if [ -z "$subcommand" ]; then
__gitcomp "$subcommands"
@ -3105,6 +3105,9 @@ _git_worktree ()
prune,--*)
__gitcomp "--dry-run --expire --verbose"
;;
remove,--*)
__gitcomp "--force"
;;
*)
;;
esac