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

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2023-03-28 16:58:49 +0300
committerJunio C Hamano <gitster@pobox.com>2023-03-28 17:36:45 +0300
commit085390328f5fe1dfba67039b1fd6cc51546a4e41 (patch)
treed6db2e038ed3a08daa9def671f8c790d7589b495
parentecb5091fd4301ac647db0bd2504112b38f7ee06d (diff)
cocci: apply the "diff.h" part of "the_repository.pending"
Apply the part of "the_repository.pending.cocci" pertaining to "diff.h". Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--builtin/log.c2
-rw-r--r--builtin/rebase.c2
-rw-r--r--builtin/stash.c2
-rw-r--r--contrib/coccinelle/the_repository.cocci4
-rw-r--r--contrib/coccinelle/the_repository.pending.cocci4
-rw-r--r--diff.h3
-rw-r--r--log-tree.c2
-rw-r--r--range-diff.c2
8 files changed, 9 insertions, 12 deletions
diff --git a/builtin/log.c b/builtin/log.c
index f249aca049..b76a1c82d8 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -1371,7 +1371,7 @@ static void make_cover_letter(struct rev_info *rev, int use_separate_file,
.other_arg = &other_arg
};
- diff_setup(&opts);
+ repo_diff_setup(the_repository, &opts);
opts.file = rev->diffopt.file;
opts.use_color = rev->diffopt.use_color;
diff_setup_done(&opts);
diff --git a/builtin/rebase.c b/builtin/rebase.c
index eba48bffaa..76cce94373 100644
--- a/builtin/rebase.c
+++ b/builtin/rebase.c
@@ -1786,7 +1786,7 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
}
/* We want color (if set), but no pager */
- diff_setup(&opts);
+ repo_diff_setup(the_repository, &opts);
opts.stat_width = -1; /* use full terminal width */
opts.stat_graph_width = -1; /* respect statGraphWidth config */
opts.output_format |=
diff --git a/builtin/stash.c b/builtin/stash.c
index ed1275829e..6c062e5204 100644
--- a/builtin/stash.c
+++ b/builtin/stash.c
@@ -427,7 +427,7 @@ static void unstage_changes_unless_new(struct object_id *orig_tree)
* to the index before a merge was run) and the current index
* (reflecting the changes brought in by the merge).
*/
- diff_setup(&diff_opts);
+ repo_diff_setup(the_repository, &diff_opts);
diff_opts.flags.recursive = 1;
diff_opts.detect_rename = 0;
diff_opts.output_format = DIFF_FORMAT_NO_OUTPUT;
diff --git a/contrib/coccinelle/the_repository.cocci b/contrib/coccinelle/the_repository.cocci
index 0cdf3f4630..3c0bd8781e 100644
--- a/contrib/coccinelle/the_repository.cocci
+++ b/contrib/coccinelle/the_repository.cocci
@@ -73,6 +73,10 @@
|
- get_commit_tree
+ repo_get_commit_tree
+// diff.h
+|
+- diff_setup
++ repo_diff_setup
)
(
+ the_repository,
diff --git a/contrib/coccinelle/the_repository.pending.cocci b/contrib/coccinelle/the_repository.pending.cocci
index bf19e6a248..00461ee86b 100644
--- a/contrib/coccinelle/the_repository.pending.cocci
+++ b/contrib/coccinelle/the_repository.pending.cocci
@@ -5,11 +5,7 @@
@@
@@
(
-// diff.h
-- diff_setup
-+ repo_diff_setup
// object-store.h
-|
- read_object_file
+ repo_read_object_file
|
diff --git a/diff.h b/diff.h
index 8d770b1d57..8b510eb579 100644
--- a/diff.h
+++ b/diff.h
@@ -535,9 +535,6 @@ int git_diff_basic_config(const char *var, const char *value, void *cb);
int git_diff_heuristic_config(const char *var, const char *value, void *cb);
void init_diff_ui_defaults(void);
int git_diff_ui_config(const char *var, const char *value, void *cb);
-#ifndef NO_THE_REPOSITORY_COMPATIBILITY_MACROS
-#define diff_setup(diffopts) repo_diff_setup(the_repository, diffopts)
-#endif
void repo_diff_setup(struct repository *, struct diff_options *);
struct option *add_diff_options(const struct option *, struct diff_options *);
int diff_opt_parse(struct diff_options *, const char **, int, const char *);
diff --git a/log-tree.c b/log-tree.c
index 4bebb86eca..1bd4d6ab00 100644
--- a/log-tree.c
+++ b/log-tree.c
@@ -849,7 +849,7 @@ void show_log(struct rev_info *opt)
* Pass minimum required diff-options to range-diff; others
* can be added later if deemed desirable.
*/
- diff_setup(&opts);
+ repo_diff_setup(the_repository, &opts);
opts.file = opt->diffopt.file;
opts.use_color = opt->diffopt.use_color;
diff_setup_done(&opts);
diff --git a/range-diff.c b/range-diff.c
index 5bcf966f6c..15d0bc35a8 100644
--- a/range-diff.c
+++ b/range-diff.c
@@ -485,7 +485,7 @@ static void output(struct string_list *a, struct string_list *b,
if (range_diff_opts->diffopt)
memcpy(&opts, range_diff_opts->diffopt, sizeof(opts));
else
- diff_setup(&opts);
+ repo_diff_setup(the_repository, &opts);
opts.no_free = 1;
if (!opts.output_format)