Method: Rugged::Diff#stat
- Defined in:
- ext/rugged/rugged_diff.c
permalink #stat ⇒ Integer
Returns the number of files/additions/deletions in this diff.
614 615 616 617 618 619 620 621 622 623 624 625 626 |
# File 'ext/rugged/rugged_diff.c', line 614
static VALUE rb_git_diff_stat(VALUE self)
{
git_diff *diff;
struct diff_stats stats = { 0, 0, 0 };
Data_Get_Struct(self, git_diff, diff);
git_diff_foreach(
diff, diff_file_stats_cb, NULL, NULL, diff_line_stats_cb, &stats);
return rb_ary_new3(
3, INT2FIX(stats.files), INT2FIX(stats.adds), INT2FIX(stats.dels));
}
|