| 1 |
|
| MODULE = Git::Raw PACKAGE = Git::Raw::Index::Entry |
| 2 |
|
| |
| 3 |
|
| SV * |
| 4 |
|
| id(self) |
| 5 |
|
| Index_Entry self |
| 6 |
|
| |
| 7 |
|
| CODE: |
| 8 |
18 |
| RETVAL = git_oid_to_sv(&self -> id); |
| 9 |
|
| |
| 10 |
|
| OUTPUT: RETVAL |
| 11 |
|
| |
| 12 |
|
| SV * |
| 13 |
|
| is_conflict(self) |
| 14 |
|
| Index_Entry self |
| 15 |
|
| |
| 16 |
|
| CODE: |
| 17 |
3 |
| RETVAL = newSViv(git_index_entry_is_conflict(self)); |
| 18 |
|
| |
| 19 |
|
| OUTPUT: RETVAL |
| 20 |
|
| |
| 21 |
|
| SV * |
| 22 |
|
| path(self) |
| 23 |
|
| Index_Entry self |
| 24 |
|
| |
| 25 |
|
| CODE: |
| 26 |
9 |
| RETVAL = newSVpv(self -> path, 0); |
| 27 |
|
| |
| 28 |
|
| OUTPUT: RETVAL |
| 29 |
|
| |
| 30 |
|
| SV * |
| 31 |
|
| size(self) |
| 32 |
|
| Index_Entry self |
| 33 |
|
| |
| 34 |
|
| CODE: |
| 35 |
1 |
| RETVAL = newSVuv((size_t) self -> file_size); |
| 36 |
|
| |
| 37 |
|
| OUTPUT: RETVAL |
| 38 |
|
| |
| 39 |
|
| SV * |
| 40 |
|
| mode(self) |
| 41 |
|
| Index_Entry self |
| 42 |
|
| |
| 43 |
|
| CODE: |
| 44 |
1 |
| RETVAL = newSVuv((size_t) self -> mode); |
| 45 |
|
| |
| 46 |
|
| OUTPUT: RETVAL |
| 47 |
|
| |
| 48 |
|
| SV * |
| 49 |
|
| stage(self) |
| 50 |
|
| Index_Entry self |
| 51 |
|
| |
| 52 |
|
| CODE: |
| 53 |
2 |
| RETVAL = newSViv(git_index_entry_stage(self)); |
| 54 |
|
| |
| 55 |
|
| OUTPUT: RETVAL |
| 56 |
|
| |
| 57 |
|
| SV * |
| 58 |
|
| clone(self, path) |
| 59 |
|
| SV *self |
| 60 |
|
| const char *path |
| 61 |
|
| |
| 62 |
|
| PREINIT: |
| 63 |
|
| Index_Entry old_entry; |
| 64 |
|
| |
| 65 |
|
| CODE: |
| 66 |
1 |
| old_entry = GIT_SV_TO_PTR(Index::Entry, self); |
| 67 |
|
| |
| 68 |
1 |
| RETVAL = git_index_entry_to_sv( |
| 69 |
|
| old_entry, path, |
| 70 |
1 |
| GIT_SV_TO_MAGIC(self) |
| 71 |
|
| ); |
| 72 |
|
| |
| 73 |
|
| OUTPUT: RETVAL |
| 74 |
|
| |
| 75 |
|
| SV * |
| 76 |
|
| blob(self) |
| 77 |
|
| SV *self |
| 78 |
|
| |
| 79 |
|
| PREINIT: |
| 80 |
|
| int rc; |
| 81 |
|
| Index_Entry entry; |
| 82 |
|
| |
| 83 |
|
| SV *repo; |
| 84 |
|
| Repository repo_ptr; |
| 85 |
|
| |
| 86 |
|
| Blob blob; |
| 87 |
|
| |
| 88 |
|
| CODE: |
| 89 |
5 |
| entry = GIT_SV_TO_PTR(Index::Entry, self); |
| 90 |
|
| |
| 91 |
5 |
| repo = GIT_SV_TO_MAGIC(self); |
| 92 |
5 |
| repo_ptr = INT2PTR(Repository, SvIV((SV *) repo)); |
| 93 |
|
| |
| 94 |
5 |
| RETVAL = &PL_sv_undef; |
| 95 |
|
| |
| 96 |
5 |
| rc = git_blob_lookup( |
| 97 |
|
| &blob, repo_ptr -> repository, |
| 98 |
5 |
| &entry -> id |
| 99 |
|
| ); |
| 100 |
5 |
▶ | if (rc != GIT_ENOTFOUND) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (rc != GIT_ENOTFOUND) { |
5 |
0 |
5 |
|
| 101 |
5 |
| git_check_error(rc); |
| 102 |
5 |
| GIT_NEW_OBJ_WITH_MAGIC( |
| 103 |
|
| RETVAL, "Git::Raw::Blob", blob, repo |
| 104 |
|
| ); |
| 105 |
|
| } |
| 106 |
|
| |
| 107 |
|
| OUTPUT: RETVAL |
| 108 |
|
| |
| 109 |
|
| void |
| 110 |
|
| DESTROY(self) |
| 111 |
|
| SV* self |
| 112 |
|
| |
| 113 |
|
| PREINIT: |
| 114 |
|
| Index_Entry entry; |
| 115 |
|
| |
| 116 |
|
| CODE: |
| 117 |
19 |
| SvREFCNT_dec(GIT_SV_TO_MAGIC(self)); |
| 118 |
|
| |
| 119 |
19 |
| entry = GIT_SV_TO_PTR(Index::Entry, self); |
| 120 |
19 |
| git_index_entry_free(entry); |