aboutsummaryrefslogtreecommitdiffstats
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-02-12 10:08:54 -0800
committerJunio C Hamano <gitster@pobox.com>2025-02-12 10:08:54 -0800
commit998c5f0c7554f511bafff587292f986a42fa2944 (patch)
tree09b67e85355f25fc4ccef877c53afd19ffb8ca77 /builtin
parentMerge branch 'jp/doc-trailer-config' (diff)
parentrefspec: relocate apply_refspecs and related funtions (diff)
downloadgit-998c5f0c7554f511bafff587292f986a42fa2944.tar.gz
git-998c5f0c7554f511bafff587292f986a42fa2944.zip
Merge branch 'ms/refspec-cleanup'
Code clean-up. cf. <Z6G-toOJjMmK8iJG@pks.im> * ms/refspec-cleanup: refspec: relocate apply_refspecs and related funtions refspec: relocate matching related functions remote: rename query_refspecs functions refspec: relocate refname_matches_negative_refspec_item remote: rename function omit_name_by_refspec
Diffstat (limited to 'builtin')
-rw-r--r--builtin/push.c2
-rw-r--r--builtin/remote.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/builtin/push.c b/builtin/push.c
index 90de3746b5..92d530e5c4 100644
--- a/builtin/push.c
+++ b/builtin/push.c
@@ -78,7 +78,7 @@ static void refspec_append_mapped(struct refspec *refspec, const char *ref,
.src = matched->name,
};
- if (!query_refspecs(&remote->push, &query) && query.dst) {
+ if (!refspec_find_match(&remote->push, &query) && query.dst) {
refspec_appendf(refspec, "%s%s:%s",
query.force ? "+" : "",
query.src, query.dst);
diff --git a/builtin/remote.c b/builtin/remote.c
index 71d84fb3cf..816d482340 100644
--- a/builtin/remote.c
+++ b/builtin/remote.c
@@ -383,7 +383,7 @@ static int get_ref_states(const struct ref *remote_refs, struct ref_states *stat
states->remote->fetch.items[i].raw);
for (ref = fetch_map; ref; ref = ref->next) {
- if (omit_name_by_refspec(ref->name, &states->remote->fetch))
+ if (refname_matches_negative_refspec_item(ref->name, &states->remote->fetch))
string_list_append(&states->skipped, abbrev_branch(ref->name));
else if (!ref->peer_ref || !refs_ref_exists(get_main_ref_store(the_repository), ref->peer_ref->name))
string_list_append(&states->new_refs, abbrev_branch(ref->name));