diff options
| author | Meet Soni <meetsoni3017@gmail.com> | 2025-02-04 09:35:54 +0530 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-02-04 09:51:41 -0800 |
| commit | e4f6ab008522c5ad386485720770b8d03b4fb880 (patch) | |
| tree | 41fb6d79a214b25bd4e7a086de4f186869c2e13e /builtin/remote.c | |
| parent | 5f8f7081f7761acdf83d0a4c6819fe3d724f01d7 (diff) | |
| download | git-e4f6ab008522c5ad386485720770b8d03b4fb880.tar.gz | |
remote: rename function omit_name_by_refspec
Rename the function `omit_name_by_refspec()` to
`refname_matches_negative_refspec_item()` to provide clearer intent.
The previous function name was vague and did not accurately describe its
purpose. By using `refname_matches_negative_refspec_item`, make the
function's purpose more intuitive, clarifying that it checks if a
reference name matches any negative refspec.
Rename function parameters for consistency with existing naming
conventions. Use `refname` instead of `name` to align with terminology
in `refs.h`.
Remove the redundant doc comment since the function name is now
self-explanatory.
Signed-off-by: Meet Soni <meetsoni3017@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/remote.c')
| -rw-r--r-- | builtin/remote.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/remote.c b/builtin/remote.c index 315cbb88e6..86cda4d054 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)); |
