Re: [RFC/PATCH 1/9] tag: libify parse_opt_points_at()
- From
Karthik Nayak <karthik.188@gmail.com>
- Date
- Jun 9, 2015, 11:50 UTC
- Message-ID
- <5576D31F.90603@gmail.com>
- In-Reply-To
- <xmqq4mmiauu0.fsf@gitster.dls.corp.google.com>
On 06/09/2015 12:30 AM, Junio C Hamano wrote:
Show 14 quoted lines
> > This feels way too specialized to live as part of parse_options > infrastructure. > > The existing caller(s) may want to use this callback for parsing > "points-at" option they have, but is that the only plausible use of > this callback? It looks to be usable by any future caller that > wants to take and accumulate any object names into an sha1-array, so > perhaps rename it to be a bit more generic to represent its nature > better? > > parse_opt_object_name() > > or something?
This makes sense! Will change.
Show 5 quoted lines
> > I also wonder if we can (and want to) refactor the users of > with-commit callback. Have them use this to obtain an sha1-array > and then convert what they received into a commit-list themselves. >
But wouldn't that be too much of an overhead to iterate through the sha1-array and convert it to a commit-list?
-- Regards, Karthik