Merge branch 'ab/remove-implicit-use-of-the-repository'
Code clean-up around the use of the_repository. * ab/remove-implicit-use-of-the-repository: libs: use "struct repository *" argument, not "the_repository" post-cocci: adjust comments for recent repo_* migration cocci: apply the "revision.h" part of "the_repository.pending" cocci: apply the "rerere.h" part of "the_repository.pending" cocci: apply the "refs.h" part of "the_repository.pending" cocci: apply the "promisor-remote.h" part of "the_repository.pending" cocci: apply the "packfile.h" part of "the_repository.pending" cocci: apply the "pretty.h" part of "the_repository.pending" cocci: apply the "object-store.h" part of "the_repository.pending" cocci: apply the "diff.h" part of "the_repository.pending" cocci: apply the "commit.h" part of "the_repository.pending" cocci: apply the "commit-reach.h" part of "the_repository.pending" cocci: apply the "cache.h" part of "the_repository.pending" cocci: add missing "the_repository" macros to "pending" cocci: sort "the_repository" rules by header cocci: fix incorrect & verbose "the_repository" rules cocci: remove dead rule from "the_repository.pending.cocci"
This commit is contained in:
6
diff.c
6
diff.c
@ -4364,7 +4364,7 @@ static int similarity_index(struct diff_filepair *p)
|
||||
static const char *diff_abbrev_oid(const struct object_id *oid, int abbrev)
|
||||
{
|
||||
if (startup_info->have_repository)
|
||||
return find_unique_abbrev(oid, abbrev);
|
||||
return repo_find_unique_abbrev(the_repository, oid, abbrev);
|
||||
else {
|
||||
char *hex = oid_to_hex(oid);
|
||||
if (abbrev < 0)
|
||||
@ -5000,7 +5000,7 @@ static int diff_opt_find_object(const struct option *option,
|
||||
struct object_id oid;
|
||||
|
||||
BUG_ON_OPT_NEG(unset);
|
||||
if (get_oid(arg, &oid))
|
||||
if (repo_get_oid(the_repository, arg, &oid))
|
||||
return error(_("unable to resolve '%s'"), arg);
|
||||
|
||||
if (!opt->objfind)
|
||||
@ -6885,7 +6885,7 @@ void diffcore_std(struct diff_options *options)
|
||||
* If no prefetching occurs, diffcore_rename() will prefetch if it
|
||||
* decides that it needs inexact rename detection.
|
||||
*/
|
||||
if (options->repo == the_repository && has_promisor_remote() &&
|
||||
if (options->repo == the_repository && repo_has_promisor_remote(the_repository) &&
|
||||
(options->output_format & output_formats_to_prefetch ||
|
||||
options->pickaxe_opts & DIFF_PICKAXE_KINDS_MASK))
|
||||
diff_queued_diff_prefetch(options->repo);
|
||||
|
Reference in New Issue
Block a user