class MGit::Add

@!scope [command] add follow git add eg: mgit add .

Public Class Methods

description() click to toggle source

@overload

# File lib/m-git/command/add.rb, line 29
def self.description
  "将文件改动加入暂存区。"
end
usage() click to toggle source

@overload

# File lib/m-git/command/add.rb, line 35
def self.usage
  "mgit add [<git-add-option>] [(--mrepo|--el-mrepo) <repo>...] [--help]"
end

Public Instance Methods

enable_repo_selection() click to toggle source

@overload @return [Boolean]

# File lib/m-git/command/add.rb, line 23
def enable_repo_selection
  true
end
execute(argv) click to toggle source

@overload

# File lib/m-git/command/add.rb, line 13
def execute(argv)
  Workspace.check_branch_consistency
  Output.puts_start_cmd
  _, error_repos = Workspace.execute_git_cmd_with_repos(argv.cmd, argv.git_opts, all_repos)
  Output.puts_succeed_cmd(argv.absolute_cmd) if error_repos.length == 0
end