Method: Index#add

Defined in:
lib/index.rb

#add(pathname, oid, stat) ⇒ Object



64
65
66
67
68
69
70
71
# File 'lib/index.rb', line 64

def add(pathname, oid, stat)
  (1..3).each { |stage| remove_entry_with_stage(pathname, stage) }

  entry = Entry.create(pathname, oid, stat)
  discard_conflicts(entry)
  store_entry(entry)
  @changed = true
end