diff options
author | Edward Thomson <ethomson@microsoft.com> | 2015-02-19 11:09:54 -0500 |
---|---|---|
committer | Edward Thomson <ethomson@microsoft.com> | 2015-02-19 11:09:54 -0500 |
commit | 795eaccd667ce24c290b6211ca0c6a84f84e7c2b (patch) | |
tree | bdef91425a91ee616f3358630ee9f2a25ede27fd /src | |
parent | d4cf167515d3ed7b27c1358fc2e19b9caf66e8ad (diff) | |
download | libgit2-795eaccd667ce24c290b6211ca0c6a84f84e7c2b.tar.gz |
git_filter_opt_t -> git_filter_flag_t
For consistency with the rest of the library, where an opt is an
options *structure*.
Diffstat (limited to 'src')
-rw-r--r-- | src/blob.c | 4 | ||||
-rw-r--r-- | src/checkout.c | 4 | ||||
-rw-r--r-- | src/crlf.c | 2 | ||||
-rw-r--r-- | src/diff.c | 2 | ||||
-rw-r--r-- | src/diff_file.c | 2 | ||||
-rw-r--r-- | src/filter.c | 20 | ||||
-rw-r--r-- | src/filter.h | 2 | ||||
-rw-r--r-- | src/repository.c | 2 |
8 files changed, 19 insertions, 19 deletions
diff --git a/src/blob.c b/src/blob.c index ba8769cdc..cf0329064 100644 --- a/src/blob.c +++ b/src/blob.c @@ -199,7 +199,7 @@ int git_blob__create_from_paths( /* Load the filters for writing this file to the ODB */ error = git_filter_list_load( &fl, repo, NULL, hint_path, - GIT_FILTER_TO_ODB, GIT_FILTER_OPT_DEFAULT); + GIT_FILTER_TO_ODB, GIT_FILTER_DEFAULT); if (error < 0) /* well, that didn't work */; @@ -357,7 +357,7 @@ int git_blob_filtered_content( if (!(error = git_filter_list_load( &fl, git_blob_owner(blob), blob, path, - GIT_FILTER_TO_WORKTREE, GIT_FILTER_OPT_DEFAULT))) { + GIT_FILTER_TO_WORKTREE, GIT_FILTER_DEFAULT))) { error = git_filter_list_apply_to_blob(out, fl, blob); diff --git a/src/checkout.c b/src/checkout.c index e48a8557c..a4dd20999 100644 --- a/src/checkout.c +++ b/src/checkout.c @@ -1441,7 +1441,7 @@ static int blob_content_to_file( if (!data->opts.disable_filters && (error = git_filter_list__load_with_attr_session( &fl, data->repo, &data->attr_session, blob, hint_path, - GIT_FILTER_TO_WORKTREE, GIT_FILTER_OPT_DEFAULT))) + GIT_FILTER_TO_WORKTREE, GIT_FILTER_DEFAULT))) return error; if (fl) @@ -2054,7 +2054,7 @@ static int checkout_write_merge( if ((error = git_filter_list__load_with_attr_session( &fl, data->repo, &data->attr_session, NULL, git_buf_cstr(&path_workdir), - GIT_FILTER_TO_WORKTREE, GIT_FILTER_OPT_DEFAULT)) < 0 || + GIT_FILTER_TO_WORKTREE, GIT_FILTER_DEFAULT)) < 0 || (error = git_filter_list_apply_to_data(&out_data, fl, &in_data)) < 0) goto done; } else { diff --git a/src/crlf.c b/src/crlf.c index c0a73990f..b5d1dbf32 100644 --- a/src/crlf.c +++ b/src/crlf.c @@ -302,7 +302,7 @@ static int crlf_check( return error; /* downgrade FAIL to WARN if ALLOW_UNSAFE option is used */ - if ((git_filter_source_options(src) & GIT_FILTER_OPT_ALLOW_UNSAFE) && + if ((git_filter_source_flags(src) & GIT_FILTER_ALLOW_UNSAFE) && ca.safe_crlf == GIT_SAFE_CRLF_FAIL) ca.safe_crlf = GIT_SAFE_CRLF_WARN; } diff --git a/src/diff.c b/src/diff.c index 07eae03e7..815351b21 100644 --- a/src/diff.c +++ b/src/diff.c @@ -600,7 +600,7 @@ int git_diff__oid_for_entry( error = -1; } else if (!(error = git_filter_list_load( &fl, diff->repo, NULL, entry.path, - GIT_FILTER_TO_ODB, GIT_FILTER_OPT_ALLOW_UNSAFE))) + GIT_FILTER_TO_ODB, GIT_FILTER_ALLOW_UNSAFE))) { int fd = git_futils_open_ro(full_path.ptr); if (fd < 0) diff --git a/src/diff_file.c b/src/diff_file.c index 96be0942b..f7061ae83 100644 --- a/src/diff_file.c +++ b/src/diff_file.c @@ -302,7 +302,7 @@ static int diff_file_content_load_workdir_file( if ((error = git_filter_list_load( &fl, fc->repo, NULL, fc->file->path, - GIT_FILTER_TO_ODB, GIT_FILTER_OPT_ALLOW_UNSAFE)) < 0) + GIT_FILTER_TO_ODB, GIT_FILTER_ALLOW_UNSAFE)) < 0) goto cleanup; /* if there are no filters, try to mmap the file */ diff --git a/src/filter.c b/src/filter.c index 4009a61f5..88877fead 100644 --- a/src/filter.c +++ b/src/filter.c @@ -23,7 +23,7 @@ struct git_filter_source { git_oid oid; /* zero if unknown (which is likely) */ uint16_t filemode; /* zero if unknown */ git_filter_mode_t mode; - uint32_t options; + uint32_t flags; }; typedef struct { @@ -372,9 +372,9 @@ git_filter_mode_t git_filter_source_mode(const git_filter_source *src) return src->mode; } -uint32_t git_filter_source_options(const git_filter_source *src) +uint32_t git_filter_source_flags(const git_filter_source *src) { - return src->options; + return src->flags; } static int filter_list_new( @@ -394,7 +394,7 @@ static int filter_list_new( fl->source.repo = src->repo; fl->source.path = fl->path; fl->source.mode = src->mode; - fl->source.options = src->options; + fl->source.flags = src->flags; *out = fl; return 0; @@ -449,13 +449,13 @@ int git_filter_list_new( git_filter_list **out, git_repository *repo, git_filter_mode_t mode, - uint32_t options) + uint32_t flags) { git_filter_source src = { 0 }; src.repo = repo; src.path = NULL; src.mode = mode; - src.options = options; + src.flags = flags; return filter_list_new(out, &src); } @@ -466,7 +466,7 @@ int git_filter_list__load_with_attr_session( git_blob *blob, /* can be NULL */ const char *path, git_filter_mode_t mode, - uint32_t options) + uint32_t flags) { int error = 0; git_filter_list *fl = NULL; @@ -481,7 +481,7 @@ int git_filter_list__load_with_attr_session( src.repo = repo; src.path = path; src.mode = mode; - src.options = options; + src.flags = flags; if (blob) git_oid_cpy(&src.oid, git_blob_id(blob)); @@ -543,10 +543,10 @@ int git_filter_list_load( git_blob *blob, /* can be NULL */ const char *path, git_filter_mode_t mode, - uint32_t options) + uint32_t flags) { return git_filter_list__load_with_attr_session( - filters, repo, NULL, blob, path, mode, options); + filters, repo, NULL, blob, path, mode, flags); } void git_filter_list__set_temp_buf(git_filter_list *fl, git_buf *temp_buf) diff --git a/src/filter.h b/src/filter.h index 53f3afdbb..a38c6c8fa 100644 --- a/src/filter.h +++ b/src/filter.h @@ -36,7 +36,7 @@ extern int git_filter_list__load_with_attr_session( git_blob *blob, /* can be NULL */ const char *path, git_filter_mode_t mode, - uint32_t options); + uint32_t flags); /* * Available filters diff --git a/src/repository.c b/src/repository.c index c9275078f..23c99b0f0 100644 --- a/src/repository.c +++ b/src/repository.c @@ -1849,7 +1849,7 @@ int git_repository_hashfile( if (strlen(as_path) > 0) { error = git_filter_list_load( &fl, repo, NULL, as_path, - GIT_FILTER_TO_ODB, GIT_FILTER_OPT_DEFAULT); + GIT_FILTER_TO_ODB, GIT_FILTER_DEFAULT); if (error < 0) return error; } else { |