| 1 |
|
| MODULE = Git::Raw PACKAGE = Git::Raw::Diff::Stats |
| 2 |
|
| |
| 3 |
|
| SV * |
| 4 |
|
| deletions(self) |
| 5 |
|
| Diff_Stats self |
| 6 |
|
| |
| 7 |
|
| CODE: |
| 8 |
2 |
| RETVAL = newSVuv(git_diff_stats_deletions(self)); |
| 9 |
|
| |
| 10 |
|
| OUTPUT: RETVAL |
| 11 |
|
| |
| 12 |
|
| SV * |
| 13 |
|
| insertions(self) |
| 14 |
|
| Diff_Stats self |
| 15 |
|
| |
| 16 |
|
| CODE: |
| 17 |
2 |
| RETVAL = newSVuv(git_diff_stats_insertions(self)); |
| 18 |
|
| |
| 19 |
|
| OUTPUT: RETVAL |
| 20 |
|
| |
| 21 |
|
| SV * |
| 22 |
|
| files_changed(self) |
| 23 |
|
| Diff_Stats self |
| 24 |
|
| |
| 25 |
|
| CODE: |
| 26 |
2 |
| RETVAL = newSVuv(git_diff_stats_files_changed(self)); |
| 27 |
|
| |
| 28 |
|
| OUTPUT: RETVAL |
| 29 |
|
| |
| 30 |
|
| SV * |
| 31 |
|
| buffer(self, ...) |
| 32 |
|
| Diff_Stats self |
| 33 |
|
| |
| 34 |
|
| PROTOTYPE: $;$ |
| 35 |
|
| PREINIT: |
| 36 |
|
| int rc; |
| 37 |
4 |
| size_t width = 0; |
| 38 |
|
| |
| 39 |
4 |
| git_buf buf = GIT_BUF_INIT_CONST(NULL, 0); |
| 40 |
|
| |
| 41 |
4 |
| git_diff_stats_format_t format = GIT_DIFF_STATS_NONE; |
| 42 |
|
| |
| 43 |
|
| CODE: |
| 44 |
4 |
▶ | if (items == 2) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (items == 2) { |
4 |
0 |
4 |
|
| 45 |
4 |
| HV *opts = git_ensure_hv(ST(1), "options"); |
| 46 |
|
| HV *flags; |
| 47 |
|
| |
| 48 |
4 |
▶ | if ((flags = git_hv_hash_entry(opts, "flags"))) { |
Branch: 1 branch
| Branch | True | False | Total |
| if ((flags = git_hv_hash_entry(opts, "flags"))) { |
4 |
0 |
4 |
|
| 49 |
4 |
| unsigned out = 0; |
| 50 |
|
| |
| 51 |
4 |
| git_flag_opt(flags, "full", GIT_DIFF_STATS_FULL, &out); |
| 52 |
4 |
| git_flag_opt(flags, "short", GIT_DIFF_STATS_SHORT, &out); |
| 53 |
4 |
| git_flag_opt(flags, "number", GIT_DIFF_STATS_NUMBER, &out); |
| 54 |
4 |
| git_flag_opt(flags, "summary", GIT_DIFF_STATS_INCLUDE_SUMMARY, &out); |
| 55 |
|
| |
| 56 |
4 |
| format = out; |
| 57 |
|
| } |
| 58 |
|
| } |
| 59 |
|
| |
| 60 |
4 |
| rc = git_diff_stats_to_buf(&buf, self, format, width); |
| 61 |
4 |
| git_check_error(rc); |
| 62 |
|
| |
| 63 |
4 |
| RETVAL = newSVpv(buf.ptr, buf.size); |
| 64 |
|
| |
| 65 |
4 |
| git_buf_dispose(&buf); |
| 66 |
|
| |
| 67 |
|
| OUTPUT: RETVAL |
| 68 |
|
| |
| 69 |
|
| void |
| 70 |
|
| DESTROY(self) |
| 71 |
|
| SV *self |
| 72 |
|
| |
| 73 |
|
| CODE: |
| 74 |
2 |
| git_diff_stats_free(GIT_SV_TO_PTR(Diff::Stats, self)); |
| 75 |
2 |
| SvREFCNT_dec(GIT_SV_TO_MAGIC(self)); |