Re: [PATCH 2/8] builtin/multi-pack-index.c: support --stdin-packs mode

2 messages, 2 authors, 2021-09-12 · open the first message on its own page

Re: [PATCH 2/8] builtin/multi-pack-index.c: support --stdin-packs mode

From: Junio C Hamano <hidden>
Date: 2021-09-12 22:30:48

Ævar Arnfjörð Bjarmason [off-list ref] writes:
Or maybe the whole approch of the string_list API is just a dead-end in
API design, i.e. it shouldn't have any "dup" mode, just nodup, if you
need something dup'd you xstrdup()-it.
;-)

Re: [PATCH 2/8] builtin/multi-pack-index.c: support --stdin-packs mode

From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2021-09-12 22:34:16

On Sun, Sep 12 2021, Junio C Hamano wrote:
Ævar Arnfjörð Bjarmason [off-list ref] writes:
quoted
Or maybe the whole approch of the string_list API is just a dead-end in
API design, i.e. it shouldn't have any "dup" mode, just nodup, if you
need something dup'd you xstrdup()-it.
;-)
I realize in practice that's a bit too much, i.e. it's very useful to be
able to use a string_list to account for a bunch of already-allocated
memory without strduping everything.

It's just unfortunate that you can't look at any code that works with
the API and understand whether it does an implicit xstrdup() or not
without tracking down its current state / where it got allocated at.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help