Re: [PATCH v2 08/14] revision.c: use commit-slab for show_source

2018-05-13 Thread Junio C Hamano
Junio C Hamano writes: > Nguyễn Thái Ngọc Duy writes: > >> -refname = commit->util; >> +refname = *revision_sources_peek(&revision_sources, commit); > > At first glance, I thought that the reason why this uses _peek() is > because the "sources" is expected to only sparsely be populated,

Re: [PATCH v2 08/14] revision.c: use commit-slab for show_source

2018-05-13 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > - refname = commit->util; > + refname = *revision_sources_peek(&revision_sources, commit); At first glance, I thought that the reason why this uses _peek() is because the "sources" is expected to only sparsely be populated, perhaps because get_tags_and_dup

[PATCH v2 08/14] revision.c: use commit-slab for show_source

2018-05-12 Thread Nguyễn Thái Ngọc Duy
Instead of relying on commit->util to store the source string, let the user provide a commit-slab to store the source strings in. It's done so that commit->util can be removed. See more explanation in the commit that removes commit->util. Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/fast-exp