summaryrefslogtreecommitdiff
path: root/abspath.c
diff options
context:
space:
mode:
authorLibravatar Eric Sunshine <sunshine@sunshineco.com>2018-08-28 17:20:20 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-08-30 09:28:02 -0700
commit602aaed03f7f82323d88703d6fa2263a13c37907 (patch)
tree5e54b90300d883edd7f4170ffa25533b004436bb /abspath.c
parentworktree: move delete_git_dir() earlier in file for upcoming new callers (diff)
downloadtgif-602aaed03f7f82323d88703d6fa2263a13c37907.tar.xz
worktree: generalize delete_git_dir() to reduce code duplication
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 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. Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'abspath.c')
0 files changed, 0 insertions, 0 deletions