git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Karthik Nayak <karthik.188@gmail.com>
Cc: git@vger.kernel.org, christian.couder@gmail.com,
	matthieu.moy@grenoble-inp.fr
Subject: Re: [PATCH v2 1/2] for-each-ref: re-structure code for moving to 'ref-filter'
Date: Mon, 25 May 2015 12:39:47 -0700	[thread overview]
Message-ID: <xmqq617gbg58.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <55636301.7060803@gmail.com> (Karthik Nayak's message of "Mon, 25 May 2015 23:29:29 +0530")

Karthik Nayak <karthik.188@gmail.com> writes:

>> I do not see much point in renaming between these two.  The latter
>> makes it sound as if this is only for "filtering" and from that
>> angle of view is probably a worse name.  If you do not think of a
>> better one, and if you are going to name the array that contains
>> this thing "ref_list", calling "ref_list_item" would be following
>> suit to what string-list did.
>>
>
> Well I just wanted to keep it related to 'ref-filter', I think
> 'ref_list_item'
> sounds better after seeing your point of view.

Also I think Matthieu already commented that "filter" was out of
place for that struct.  I still think your ref_list is better called
ref_array, but that is a minor point.  Use of "foo_list" in our
codebase is predominantly (because we use "commit_list" very often
in the core part of the system) for a linear linked list where you
do not have a random access to the items.  string-list is misnomer,
I would think.

> I didn't know about the "we are trying to move away from calling the
> name of objects as "sha1[]"". Will leave it as objectname then.

I think you now know after seeing that 56-patch series ;-)

>> You didn't explain why you reordered the fields, either.  Were you
>> planning to make the name[] field to flex-array to reduce need for
>> one level of redirection or something?
>>
>
> Yes! exactly why the re-order, was going to rebase it and squash it
> in, if the code seemed to be up and running.

If that is the case, I would suggest making that "turn it flex array"
a separate step.

  reply	other threads:[~2015-05-25 19:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-25 12:39 [WIP][Patch v2 0/2] Ref-filter: unification of 'tag -l', 'branch -l' and 'for-each-ref' Karthik Nayak
2015-05-25 12:45 ` [PATCH v2 1/2] for-each-ref: re-structure code for moving to 'ref-filter' Karthik Nayak
2015-05-25 17:15   ` Junio C Hamano
2015-05-25 17:59     ` Karthik Nayak
2015-05-25 19:39       ` Junio C Hamano [this message]
2015-05-26  6:58         ` Karthik Nayak
2015-05-26 15:49     ` Matthieu Moy
2015-05-28  7:08       ` Karthik Nayak
2015-05-28 11:26         ` Matthieu Moy
2015-05-25 12:45 ` [PATCH v2 2/2] ref-filter: move code from 'for-each-ref' Karthik Nayak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqq617gbg58.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=karthik.188@gmail.com \
    --cc=matthieu.moy@grenoble-inp.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).