9740ef8 Merge branch 'es/worktree-duplicate-paths'

Merged and Committed by Junio C Hamano 3 years ago
    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
    
        
file modified
+93 -35
file modified
+24 -0
file modified
+21 -0