class Git::Commands::Worktree::Lock

Locks a worktree to prevent it from being pruned

@example Lock a worktree

Git::Commands::Worktree::Lock.new(execution_context).call('/tmp/feature')

@example Lock with a reason message

Git::Commands::Worktree::Lock.new(execution_context).call('/tmp/feature', reason: 'on NFS share')

@note โ€˜arguments` block audited against

https://git-scm.com/docs/git-worktree/2.54.0

@see Git::Commands::Worktree Git::Commands::Worktree for the full sub-command list

@see git-scm.com/docs/git-worktree git-worktree documentation

@api private