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:53 +0300
committerJunio C Hamano <gitster@pobox.com>2023-03-28 17:36:46 +0300
commita5183d7696db34433ebcae64bad7609d5bb3a744 (patch)
treeacc30bb6df39c051754ed03698df7de8e00122ca /builtin
parentafe27c889429438829bc8818ed17e4960bd3ef02 (diff)
cocci: apply the "promisor-remote.h" part of "the_repository.pending"
Apply the part of "the_repository.pending.cocci" pertaining to "promisor-remote.h". Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/cat-file.c2
-rw-r--r--builtin/fetch.c4
-rw-r--r--builtin/gc.c2
-rw-r--r--builtin/index-pack.c2
-rw-r--r--builtin/pack-objects.c2
-rw-r--r--builtin/repack.c2
6 files changed, 7 insertions, 7 deletions
diff --git a/builtin/cat-file.c b/builtin/cat-file.c
index caf2d25861..b72dd91bd1 100644
--- a/builtin/cat-file.c
+++ b/builtin/cat-file.c
@@ -792,7 +792,7 @@ static int batch_objects(struct batch_options *opt)
if (!memcmp(&data.info, &empty, sizeof(empty)))
data.skip_object_info = 1;
- if (has_promisor_remote())
+ if (repo_has_promisor_remote(the_repository))
warning("This repository uses promisor remotes. Some objects may not be loaded.");
read_replace_refs = 0;
diff --git a/builtin/fetch.c b/builtin/fetch.c
index 784e344d2b..0020015ca4 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -2008,7 +2008,7 @@ static inline void fetch_one_setup_partial(struct remote *remote)
* If no prior partial clone/fetch and the current fetch DID NOT
* request a partial-fetch, do a normal fetch.
*/
- if (!has_promisor_remote() && !filter_options.choice)
+ if (!repo_has_promisor_remote(the_repository) && !filter_options.choice)
return;
/*
@@ -2264,7 +2264,7 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)
printf("%s\n", oid_to_hex(oid));
oidset_clear(&acked_commits);
} else if (remote) {
- if (filter_options.choice || has_promisor_remote())
+ if (filter_options.choice || repo_has_promisor_remote(the_repository))
fetch_one_setup_partial(remote);
result = fetch_one(remote, argc, argv, prune_tags_ok, stdin_refspecs);
} else {
diff --git a/builtin/gc.c b/builtin/gc.c
index bef26020f9..a1a2ae4da2 100644
--- a/builtin/gc.c
+++ b/builtin/gc.c
@@ -699,7 +699,7 @@ int cmd_gc(int argc, const char **argv, const char *prefix)
strvec_push(&prune, prune_expire);
if (quiet)
strvec_push(&prune, "--no-progress");
- if (has_promisor_remote())
+ if (repo_has_promisor_remote(the_repository))
strvec_push(&prune,
"--exclude-promisor-objects");
prune_cmd.git_cmd = 1;
diff --git a/builtin/index-pack.c b/builtin/index-pack.c
index 4cf69ee1d9..de47f3f644 100644
--- a/builtin/index-pack.c
+++ b/builtin/index-pack.c
@@ -1390,7 +1390,7 @@ static void fix_unresolved_deltas(struct hashfile *f)
sorted_by_pos[i] = &ref_deltas[i];
QSORT(sorted_by_pos, nr_ref_deltas, delta_pos_compare);
- if (has_promisor_remote()) {
+ if (repo_has_promisor_remote(the_repository)) {
/*
* Prefetch the delta bases.
*/
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
index 3c9b35642c..2f2c02589b 100644
--- a/builtin/pack-objects.c
+++ b/builtin/pack-objects.c
@@ -2078,7 +2078,7 @@ static void check_object(struct object_entry *entry, uint32_t object_index)
if (oid_object_info_extended(the_repository, &entry->idx.oid, &oi,
OBJECT_INFO_SKIP_FETCH_OBJECT | OBJECT_INFO_LOOKUP_REPLACE) < 0) {
- if (has_promisor_remote()) {
+ if (repo_has_promisor_remote(the_repository)) {
prefetch_to_pack(object_index);
if (oid_object_info_extended(the_repository, &entry->idx.oid, &oi,
OBJECT_INFO_SKIP_FETCH_OBJECT | OBJECT_INFO_LOOKUP_REPLACE) < 0)
diff --git a/builtin/repack.c b/builtin/repack.c
index f649379531..25658fe732 100644
--- a/builtin/repack.c
+++ b/builtin/repack.c
@@ -901,7 +901,7 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
strvec_push(&cmd.args, "--reflog");
strvec_push(&cmd.args, "--indexed-objects");
}
- if (has_promisor_remote())
+ if (repo_has_promisor_remote(the_repository))
strvec_push(&cmd.args, "--exclude-promisor-objects");
if (!write_midx) {
if (write_bitmaps > 0)