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
17572f67
Commit
17572f67
authored
Apr 21, 2016
by
Edward Thomson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
git_patch_parse_ctx: refcount the context
parent
9be638ec
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
28 additions
and
15 deletions
+28
-15
src/patch.h
+0
-15
src/patch_parse.c
+0
-0
src/patch_parse.h
+25
-0
tests/apply/fromfile.c
+1
-0
tests/patch/parse.c
+1
-0
tests/patch/print.c
+1
-0
No files found.
src/patch.h
View file @
17572f67
...
@@ -61,21 +61,6 @@ typedef struct {
...
@@ -61,21 +61,6 @@ typedef struct {
#define GIT_PATCH_OPTIONS_INIT { 1 }
#define GIT_PATCH_OPTIONS_INIT { 1 }
/**
* Create a patch for a single file from the contents of a patch buffer.
*
* @param out The patch to be created
* @param contents The contents of a patch file
* @param contents_len The length of the patch file
* @param opts The git_patch_options
* @return 0 on success, <0 on failure.
*/
extern
int
git_patch_from_buffer
(
git_patch
**
out
,
const
char
*
contents
,
size_t
contents_len
,
git_patch_options
*
opts
);
extern
void
git_patch_free
(
git_patch
*
patch
);
extern
void
git_patch_free
(
git_patch
*
patch
);
#endif
#endif
src/patch_parse.c
View file @
17572f67
This diff is collapsed.
Click to expand it.
src/patch_parse.h
0 → 100644
View file @
17572f67
/*
* Copyright (C) the libgit2 contributors. All rights reserved.
*
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
#ifndef INCLUDE_patch_parse_h__
#define INCLUDE_patch_parse_h__
/**
* Create a patch for a single file from the contents of a patch buffer.
*
* @param out The patch to be created
* @param contents The contents of a patch file
* @param contents_len The length of the patch file
* @param opts The git_patch_options
* @return 0 on success, <0 on failure.
*/
extern
int
git_patch_from_buffer
(
git_patch
**
out
,
const
char
*
contents
,
size_t
contents_len
,
const
git_patch_options
*
opts
);
#endif
tests/apply/fromfile.c
View file @
17572f67
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
#include "apply.h"
#include "apply.h"
#include "patch.h"
#include "patch.h"
#include "patch_parse.h"
#include "repository.h"
#include "repository.h"
#include "buf_text.h"
#include "buf_text.h"
...
...
tests/patch/parse.c
View file @
17572f67
#include "clar_libgit2.h"
#include "clar_libgit2.h"
#include "patch.h"
#include "patch.h"
#include "patch_parse.h"
#include "patch_common.h"
#include "patch_common.h"
...
...
tests/patch/print.c
View file @
17572f67
#include "clar_libgit2.h"
#include "clar_libgit2.h"
#include "patch.h"
#include "patch.h"
#include "patch_parse.h"
#include "patch_common.h"
#include "patch_common.h"
...
...
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