Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2013-10-16 02:10:07 +0400
committerRussell Belfer <rb@github.com>2013-10-16 02:10:07 +0400
commit10672e3e455eba2d4ca983070ed427caeeb24a6f (patch)
treee812af06091362849e9ecd279c5547e401cb0862 /src/diff_tform.c
parent3ff1d123736e5686fb9ec16e65828d5b8ffa2b30 (diff)
Diff API cleanup
This lays groundwork for separating formatting options from diff creation options. This groups the formatting flags separately from the diff list creation flags and reorders the options. This also tweaks some APIs to further separate code that uses patches from code that just looks at git_diffs.
Diffstat (limited to 'src/diff_tform.c')
-rw-r--r--src/diff_tform.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/diff_tform.c b/src/diff_tform.c
index c0a60672c..92771847c 100644
--- a/src/diff_tform.c
+++ b/src/diff_tform.c
@@ -117,15 +117,15 @@ int git_diff_merge(
git_pool_init(&onto_pool, 1, 0) < 0)
return -1;
- if ((onto->opts.flags & GIT_DIFF_DELTAS_ARE_ICASE) != 0 ||
- (from->opts.flags & GIT_DIFF_DELTAS_ARE_ICASE) != 0)
+ if ((onto->opts.flags & GIT_DIFF_IGNORE_CASE) != 0 ||
+ (from->opts.flags & GIT_DIFF_IGNORE_CASE) != 0)
{
ignore_case = true;
/* This function currently only supports merging diff lists that
* are sorted identically. */
- assert((onto->opts.flags & GIT_DIFF_DELTAS_ARE_ICASE) != 0 &&
- (from->opts.flags & GIT_DIFF_DELTAS_ARE_ICASE) != 0);
+ assert((onto->opts.flags & GIT_DIFF_IGNORE_CASE) != 0 &&
+ (from->opts.flags & GIT_DIFF_IGNORE_CASE) != 0);
}
for (i = 0, j = 0; i < onto->deltas.length || j < from->deltas.length; ) {
@@ -232,7 +232,7 @@ int git_diff_find_similar__calc_similarity(
static int normalize_find_opts(
git_diff *diff,
git_diff_find_options *opts,
- git_diff_find_options *given)
+ const git_diff_find_options *given)
{
git_config *cfg = NULL;
@@ -760,7 +760,7 @@ typedef struct {
int git_diff_find_similar(
git_diff *diff,
- git_diff_find_options *given_opts)
+ const git_diff_find_options *given_opts)
{
size_t s, t;
int error = 0, similarity;