Class: Command::Add
Constant Summary collapse
- LOCKED_INDEX_MESSAGE =
<<~MSG Another jit process seems to be running in this repository. Please make sure all processes are terminated then try again. If it still fails, a jit process may have crashed in this repository earlier: remove the file manually to continue. MSG
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Command::Base
Instance Method Details
#run ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/command/add.rb', line 14 def run repo.index.load_for_update .each { |path| add_to_index(path) } repo.index.write_updates exit 0 rescue Lockfile::LockDenied => error handle_locked_index(error) rescue Workspace::MissingFile => error handle_missing_file(error) rescue Workspace::NoPermission => error handle_unreadable_file(error) end |