Re: [GSoC][PATCH v4 1/5] remote: rename function omit_name_by_refspec
- From
Meet Soni <meetsoni3017@gmail.com>
- Date
- Feb 4, 2025, 13:58 UTC
- Message-ID
- <CAPhwyn32CmjtKu5ivxS9=AJ-h+5GskDUp=rUGvofv-aWLhH8Ng@mail.gmail.com>
- In-Reply-To
- <CAOLa=ZShqCkyabVK2PU-XXpx9QS3_W=9QMH6ioJB=t8Ec2NYqg@mail.gmail.com>
On Tue, 4 Feb 2025 at 14:30, Karthik Nayak <karthik.188@gmail.com> wrote:
Show 23 quoted lines
> > Meet Soni <meetsoni3017@gmail.com> writes: > > > diff --git a/remote.h b/remote.h > > index bda10dd5c8..66ee53411d 100644 > > --- a/remote.h > > +++ b/remote.h > > @@ -261,11 +261,7 @@ int resolve_remote_symref(struct ref *ref, struct ref *list); > > */ > > struct ref *ref_remove_duplicates(struct ref *ref_map); > > > > -/* > > - * Check whether a name matches any negative refspec in rs. Returns 1 if the > > - * name matches at least one negative refspec, and 0 otherwise. > > - */ > > -int omit_name_by_refspec(const char *name, struct refspec *rs); > > +int refname_matches_negative_refspec_item(const char *refname, struct refspec *rs); > > > > Nit: The first sentence is now duplicated by the function name as > mentioned in the commit message. But aren't we loosing information by > removing the second sentence? >
Correct. I considered keeping the second sentence for clarity, but that other function signatures in the codebase don’t include comments solely describing return values. To maintain consistency with the existing style, I opted to remove it. Let me know if you think an alternative approach would be better!
> > /* > > * Remove all entries in the input list which match any negative refspec in > > -- > > 2.34.1