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
a235e9d3
Commit
a235e9d3
authored
Feb 15, 2013
by
Russell Belfer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pluggable similarity metric API
parent
aa643260
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
include/git2/diff.h
+13
-0
No files found.
include/git2/diff.h
View file @
a235e9d3
...
...
@@ -390,6 +390,16 @@ typedef enum {
}
git_diff_find_t
;
/**
* Pluggable similarity metric
*/
typedef
struct
{
int
(
*
calc_signature
)(
void
**
out
,
const
git_diff_file
*
file
,
void
*
payload
);
void
(
*
free_signature
)(
void
*
sig
,
void
*
payload
);
int
(
*
calc_similarity
)(
int
*
score
,
void
*
siga
,
void
*
sigb
,
void
*
payload
);
void
*
payload
;
}
git_diff_similarity_metric
;
/**
* Control behavior of rename and copy detection
*/
typedef
struct
{
...
...
@@ -411,6 +421,9 @@ typedef struct {
* the `diff.renameLimit` config) (default 200)
*/
unsigned
int
target_limit
;
/** Pluggable similarity metric; pass NULL to use internal metric */
git_diff_similarity_metric
*
metric
;
}
git_diff_find_options
;
#define GIT_DIFF_FIND_OPTIONS_VERSION 1
...
...
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