Method: Rugged::Patch#to_s

Defined in:
ext/rugged/rugged_patch.c

#to_sString

Returns the contents of the patch as a single diff string.

Returns:

  • (String)


219
220
221
222
223
224
225
226
227
228
# File 'ext/rugged/rugged_patch.c', line 219

static VALUE rb_git_diff_patch_to_s(VALUE self)
{
	git_patch *patch;
	VALUE rb_str = rb_str_new(NULL, 0);
	Data_Get_Struct(self, git_patch, patch);

	rugged_exception_check(git_patch_print(patch, patch_print_cb, (void*)rb_str));

	return rb_str;
}