Method: Rugged::Index#remove
- Defined in:
- ext/rugged/rugged_index.c
#remove(path[, stage = 0]) ⇒ nil
Removes the entry at the given path
with the given stage
from the index.
215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 |
# File 'ext/rugged/rugged_index.c', line 215 static VALUE rb_git_index_remove(int argc, VALUE *argv, VALUE self) { git_index *index; int error, stage = 0; VALUE rb_entry, rb_stage; Data_Get_Struct(self, git_index, index); if (rb_scan_args(argc, argv, "11", &rb_entry, &rb_stage) > 1) { Check_Type(rb_stage, T_FIXNUM); stage = FIX2INT(rb_stage); } Check_Type(rb_entry, T_STRING); error = git_index_remove(index, StringValueCStr(rb_entry), stage); rugged_exception_check(error); return Qnil; } |