Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Sunshine <sunshine@sunshineco.com>2020-06-10 09:30:44 +0300
committerJunio C Hamano <gitster@pobox.com>2020-06-10 20:54:49 +0300
commit1b14d40b385580a366c92f8c2a9373e6fd7cb26f (patch)
treeb830d245c1c248ea574d38556176569ba1a71967 /builtin/worktree.c
parentc9b77f2cea2f0b4ee34d1d7a25cd1ebed767caf4 (diff)
worktree: give "should be pruned?" function more meaningful name
Readers of the name prune_worktree() are likely to expect the function to actually prune a worktree, however, it only answers the question "should this worktree be pruned?". Give it a name more reflective of its true purpose to avoid such confusion. Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/worktree.c')
-rw-r--r--builtin/worktree.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/worktree.c b/builtin/worktree.c
index 27325f42c5..0402f244ea 100644
--- a/builtin/worktree.c
+++ b/builtin/worktree.c
@@ -67,7 +67,7 @@ static void delete_worktrees_dir_if_empty(void)
rmdir(git_path("worktrees")); /* ignore failed removal */
}
-static int prune_worktree(const char *id, struct strbuf *reason)
+static int should_prune_worktree(const char *id, struct strbuf *reason)
{
struct stat st;
char *path;
@@ -144,7 +144,7 @@ static void prune_worktrees(void)
if (is_dot_or_dotdot(d->d_name))
continue;
strbuf_reset(&reason);
- if (!prune_worktree(d->d_name, &reason))
+ if (!should_prune_worktree(d->d_name, &reason))
continue;
if (show_only || verbose)
printf_ln(_("Removing %s/%s: %s"),