On Sat, Sep 29, 2018 at 11:31:08AM -0700, Junio C Hamano wrote:
> > The only funny thing is that you have to "dereference" the iterator like
> > this:
> >
> > struct list_head *pos;
> > struct actual_thing *item;
> > ...
> > item = list_entry(pos, struct actual_thing, list_member);
> >
> >
Jeff King writes:
> So yet another alternative here is to just define a single hashmap that
> stores void pointers. That also throws away some type safety, but is
> maybe conceptually simpler. I dunno.
I was tempted to try that route, which would essentially give us "if
you are abusing string-li
Jeff King writes:
> On Wed, Sep 26, 2018 at 03:59:08PM -0700, Stefan Beller wrote:
>
>> > +struct refname_hash_entry {
>> > + struct hashmap_entry ent; /* must be the first member */
>>
>> $ git grep "struct hashmap_entry" reveals that we have another
>> convention that we follow but not d
On Wed, Sep 26, 2018 at 03:59:08PM -0700, Stefan Beller wrote:
> > +struct refname_hash_entry {
> > + struct hashmap_entry ent; /* must be the first member */
>
> $ git grep "struct hashmap_entry" reveals that we have another
> convention that we follow but not document, which is to stress
On Wed, Sep 26, 2018 at 02:28:28PM -0700, Junio C Hamano wrote:
> In find_non_local_tags() helper function (used to implement the
> "follow tags"), we use string_list_has_string() on two string lists
> as a way to see if a refname has already been processed, etc.
>
> All this code predates more m
On Wed, Sep 26, 2018 at 2:28 PM Junio C Hamano wrote:
>
> +struct refname_hash_entry {
> + struct hashmap_entry ent; /* must be the first member */
$ git grep "struct hashmap_entry" reveals that we have another
convention that we follow but not document, which is to stress
the importance o
In find_non_local_tags() helper function (used to implement the
"follow tags"), we use string_list_has_string() on two string lists
as a way to see if a refname has already been processed, etc.
All this code predates more modern in-core lookup API like hashmap;
replace them with two hashmaps and o
7 matches
Mail list logo