Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
58d757b1
Commit
58d757b1
authored
Nov 14, 2016
by
Jason Haslam
Committed by
KOLANICH
Dec 11, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
patch: add owner accessor
parent
03ea04bf
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
include/git2/patch.h
+8
-0
src/patch.c
+5
-0
No files found.
include/git2/patch.h
View file @
58d757b1
...
...
@@ -29,6 +29,14 @@ GIT_BEGIN_DECL
typedef
struct
git_patch
git_patch
;
/**
* Get the repository associated with this patch. May be NULL.
*
* @param patch the patch
* @return a pointer to the repository
*/
GIT_EXTERN
(
git_repository
*
)
git_patch_owner
(
const
git_patch
*
patch
);
/**
* Return a patch for an entry in the diff list.
*
* The `git_patch` is a newly created object contains the text diffs
...
...
src/patch.c
View file @
58d757b1
...
...
@@ -204,6 +204,11 @@ int git_patch_get_line_in_hunk(
return
0
;
}
git_repository
*
git_patch_owner
(
const
git_patch
*
patch
)
{
return
patch
->
repo
;
}
int
git_patch_from_diff
(
git_patch
**
out
,
git_diff
*
diff
,
size_t
idx
)
{
GIT_ASSERT_ARG
(
out
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment