Re: [PATCH 3/9] worktree: generalize delete_git_dir() to reduce code duplication

2018-08-30 Thread Eric Sunshine
On Thu, Aug 30, 2018 at 2:57 AM Jeff King wrote: > On Tue, Aug 28, 2018 at 05:20:20PM -0400, Eric Sunshine wrote: > > Simplify by extending delete_git_dir() to handle the little bit of > > extra functionality needed by prune_worktrees(), and drop the > > effectively duplicate code from the latter.

Re: [PATCH 3/9] worktree: generalize delete_git_dir() to reduce code duplication

2018-08-29 Thread Jeff King
On Tue, Aug 28, 2018 at 05:20:20PM -0400, Eric Sunshine wrote: > prune_worktrees() and delete_git_dir() both remove worktree > administrative entries from .git/worktrees, and their implementations > are nearly identical. The only difference is that prune_worktrees() is > also capable of removing a

[PATCH 3/9] worktree: generalize delete_git_dir() to reduce code duplication

2018-08-28 Thread Eric Sunshine
prune_worktrees() and delete_git_dir() both remove worktree administrative entries from .git/worktrees, and their implementations are nearly identical. The only difference is that prune_worktrees() is also capable of removing a bogus non-worktree-related file from .git/worktrees. Simplify by exten