Method: Rugged::Index#clear

Defined in:
ext/rugged/rugged_index.c

#clearnil

Clear the contents (remove all entries) of the index object. Changes are in-memory only and can be saved by calling #write.

Returns:

  • (nil)
[View source]

72
73
74
75
76
77
78
# File 'ext/rugged/rugged_index.c', line 72

static VALUE rb_git_index_clear(VALUE self)
{
  git_index *index;
  Data_Get_Struct(self, git_index, index);
  git_index_clear(index);
  return Qnil;
}