Merge branch 'es/worktree-duplicate-paths'
authorJunio C Hamano <gitster@pobox.com>
Mon, 22 Jun 2020 22:55:03 +0000 (15:55 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 22 Jun 2020 22:55:03 +0000 (15:55 -0700)
commit9740ef888edadcb12442faf2a690016bb8a2c03c
tree0f05bfe3204f247da3a68c8cfb462a68501e2b42
parentb8a52995941fca5dee9179607f089c39ac559965
parent810382ed378731314c03627a8a2d8962b814ad17
Merge branch 'es/worktree-duplicate-paths'

The same worktree directory must be registered only once, but
"git worktree move" allowed this invariant to be violated, which
has been corrected.

* es/worktree-duplicate-paths:
  worktree: make "move" refuse to move atop missing registered worktree
  worktree: generalize candidate worktree path validation
  worktree: prune linked worktree referencing main worktree path
  worktree: prune duplicate entries referencing same worktree path
  worktree: make high-level pruning re-usable
  worktree: give "should be pruned?" function more meaningful name
  worktree: factor out repeated string literal
builtin/worktree.c