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 @@ -36,6 +36,14 @@ typedef struct git_patch git_patch;
36
36
*/
37
37
GIT_EXTERN (git_repository * ) git_patch_owner (const git_patch * patch );
38
38
39
+ /**
40
+ * Get the context lines setting from the diff options.
41
+ *
42
+ * @param patch the patch
43
+ * @return context lines setting
44
+ */
45
+ GIT_EXTERN (int ) git_patch_context_lines (const git_patch * patch );
46
+
39
47
/**
40
48
* Return a patch for an entry in the diff list.
41
49
*
Original file line number Diff line number Diff line change @@ -209,6 +209,11 @@ git_repository *git_patch_owner(const git_patch *patch)
209
209
return patch -> repo ;
210
210
}
211
211
212
+ int git_patch_context_lines (const git_patch * patch )
213
+ {
214
+ return patch -> diff_opts .context_lines ;
215
+ }
216
+
212
217
int git_patch_from_diff (git_patch * * out , git_diff * diff , size_t idx )
213
218
{
214
219
GIT_ASSERT_ARG (out );
You can’t perform that action at this time.
0 commit comments