Class: RubyCoded::Tools::GitAddTool

Inherits:
GitBaseTool show all
Defined in:
lib/ruby_coded/tools/git_add_tool.rb

Overview

Stage specific files or all current changes in the git repository.

Constant Summary

Constants inherited from GitBaseTool

RubyCoded::Tools::GitBaseTool::GIT_ENV, RubyCoded::Tools::GitBaseTool::MAX_OUTPUT_CHARS

Constants inherited from BaseTool

BaseTool::CONFIRM_RISK, BaseTool::DANGEROUS_RISK, BaseTool::SAFE_RISK

Instance Method Summary collapse

Methods inherited from GitBaseTool

#ensure_git_repo!, #format_git_result, #git_repo?, #run_git_command, #shell_join, #truncate_output

Methods inherited from BaseTool

#initialize

Constructor Details

This class inherits a constructor from RubyCoded::Tools::BaseTool

Instance Method Details

#execute(paths: nil, all: false) ⇒ Object



19
20
21
22
23
# File 'lib/ruby_coded/tools/git_add_tool.rb', line 19

def execute(paths: nil, all: false)
  return stage_all if all

  stage_paths(paths)
end