Method: Rugged::Index#remove_dir
- Defined in:
- ext/rugged/rugged_index.c
permalink #remove_dir(dir[, stage = 0]) ⇒ nil
Removes all entries under the given dir
with the given stage
from the index.
244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 |
# File 'ext/rugged/rugged_index.c', line 244
static VALUE rb_git_index_remove_directory(int argc, VALUE *argv, VALUE self)
{
git_index *index;
int error, stage = 0;
VALUE rb_dir, rb_stage;
Data_Get_Struct(self, git_index, index);
if (rb_scan_args(argc, argv, "11", &rb_dir, &rb_stage) > 1) {
Check_Type(rb_stage, T_FIXNUM);
stage = FIX2INT(rb_stage);
}
Check_Type(rb_dir, T_STRING);
error = git_index_remove_directory(index, StringValueCStr(rb_dir), stage);
rugged_exception_check(error);
return Qnil;
}
|