File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed
Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,14 @@ GIT_BEGIN_DECL
2828 */
2929typedef struct git_patch git_patch ;
3030
31+ /**
32+ * Get the repository associated with this patch. May be NULL.
33+ *
34+ * @param patch the patch
35+ * @return a pointer to the repository
36+ */
37+ GIT_EXTERN (git_repository * ) git_patch_owner (const git_patch * patch );
38+
3139/**
3240 * Return a patch for an entry in the diff list.
3341 *
Original file line number Diff line number Diff line change @@ -204,6 +204,11 @@ int git_patch_get_line_in_hunk(
204204 return 0 ;
205205}
206206
207+ git_repository * git_patch_owner (const git_patch * patch )
208+ {
209+ return patch -> repo ;
210+ }
211+
207212int git_patch_from_diff (git_patch * * out , git_diff * diff , size_t idx )
208213{
209214 GIT_ASSERT_ARG (out );
You can’t perform that action at this time.
0 commit comments