Skip to content

Commit f030ddb

Browse files
committed
sneak in docs for bytesize method
1 parent 491c49e commit f030ddb

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

ext/rugged/rugged_patch.c

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,27 @@ static VALUE rb_git_diff_patch_lines(int argc, VALUE *argv, VALUE self)
226226

227227
return INT2FIX(total_out);
228228
}
229-
229+
/*
230+
* call-seq:
231+
* patch.bytesize(options = {}) -> int
232+
*
233+
* The following options can be passed in the +options+ Hash:
234+
*
235+
* :include_context ::
236+
* Boolean value specifying that context lines should be included when
237+
* counting the number of bytes in the patch.
238+
*
239+
* :include_hunk_headers ::
240+
* Boolean value specifying that hunk headers should be included when
241+
* counting the number of bytes in the patch.
242+
*
243+
* :include_file_headers ::
244+
* Boolean value specifying that file headers should be included when
245+
* counting the number of bytes in the patch.
246+
*
247+
* Returns the number of bytes in the patch, depending on which options are
248+
* specified.
249+
*/
230250
static VALUE rb_git_diff_patch_bytesize(int argc, VALUE *argv, VALUE self)
231251
{
232252
git_patch *patch;

0 commit comments

Comments
 (0)