aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/push.c
diff options
context:
space:
mode:
authorMeet Soni <meetsoni3017@gmail.com>2025-02-04 09:35:56 +0530
committerJunio C Hamano <gitster@pobox.com>2025-02-04 09:51:41 -0800
commitbe0905fed1cdc9a2269f19569c518f00d54d2dbe (patch)
tree2d47f9613180e8faa08797bb82cdab9f508fdaa6 /builtin/push.c
parentrefspec: relocate refname_matches_negative_refspec_item (diff)
downloadgit-be0905fed1cdc9a2269f19569c518f00d54d2dbe.tar.gz
git-be0905fed1cdc9a2269f19569c518f00d54d2dbe.zip
remote: rename query_refspecs functions
Rename functions related to handling refspecs in preparation for their move from `remote.c` to `refspec.c`. Update their names to better reflect their intent: - `query_refspecs()` -> `refspec_find_match()` for clarity, as it finds a single matching refspec. - `query_refspecs_multiple()` -> `refspec_find_all_matches()` to better reflect that it collects all matching refspecs instead of returning just the first match. - `query_matches_negative_refspec()` -> `refspec_find_negative_match()` for consistency with the updated naming convention, even though this static function didn't strictly require renaming. Signed-off-by: Meet Soni <meetsoni3017@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/push.c')
-rw-r--r--builtin/push.c2
1 files changed, 1 insertions, 1 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);