libgit2

git_worktree_is_prunable

Version:

Is the worktree prunable with the given options?

A worktree is not prunable in the following scenarios:

  • the worktree is linking to a valid on-disk worktree. The valid member will cause this check to be ignored.
  • the worktree is locked. The locked flag will cause this check to be ignored.

If the worktree is not valid and not locked or if the above flags have been passed in, this function will return a positive value.

Signature

int git_worktree_is_prunable(git_worktree *wt, git_worktree_prune_options *opts);

Parameters

Returns

int

Versions