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
Public Instance Methods
Source
# File lib/git/commands/worktree/lock.rb, line 54 def call(...) = super # rubocop:disable Lint/UselessMethodDefinition end
@overload call(worktree, **options)
Lock a worktree to prevent it from being pruned @param worktree [String] path or unique suffix identifying the worktree to lock @param options [Hash] command options @option options [String] :reason (nil) human-readable explanation stored alongside the lock @return [Git::CommandLine::Result] the result of calling `git worktree lock`
@raise [ArgumentError] if unsupported options are provided
@raise [Git::FailedError] if git exits with a non-zero exit status
@api public
Calls superclass method