]> git.ipfire.org Git - thirdparty/git.git/commit
worktree: make high-level pruning re-usable
authorEric Sunshine <sunshine@sunshineco.com>
Wed, 10 Jun 2020 06:30:45 +0000 (02:30 -0400)
committerJunio C Hamano <gitster@pobox.com>
Wed, 10 Jun 2020 17:54:49 +0000 (10:54 -0700)
commitdd9609a12e83969be6536853b2846866dafdfc98
treea38dbe4a27e2b78efcef19a21f3f381387f9848f
parent1b14d40b385580a366c92f8c2a9373e6fd7cb26f
worktree: make high-level pruning re-usable

The low-level logic for removing a worktree is well encapsulated in
delete_git_dir(). However, high-level details related to pruning a
worktree -- such as dealing with verbosity and dry-run mode -- are not
encapsulated. Factor out this high-level logic into its own function so
it can be re-used as new worktree corruption detectors are added.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/worktree.c