Re: [PATCH 1/2] fast-import: duplicate parsed encoding string

2019-08-26 Thread Jeff King
On Mon, Aug 26, 2019 at 11:28:58AM -0700, Elijah Newren wrote: > On Sun, Aug 25, 2019 at 1:08 AM Jeff King wrote: > > > > We read each line of the fast-import stream into the command_buf strbuf. > > When reading a commit, we parse a line like "encoding foo" by storing a > > pointer to "foo", but

Re: [PATCH 1/2] fast-import: duplicate parsed encoding string

2019-08-26 Thread Elijah Newren
On Sun, Aug 25, 2019 at 1:08 AM Jeff King wrote: > > We read each line of the fast-import stream into the command_buf strbuf. > When reading a commit, we parse a line like "encoding foo" by storing a > pointer to "foo", but not making a copy. We may then read an unbounded > number of other lines (

[PATCH 1/2] fast-import: duplicate parsed encoding string

2019-08-25 Thread Jeff King
We read each line of the fast-import stream into the command_buf strbuf. When reading a commit, we parse a line like "encoding foo" by storing a pointer to "foo", but not making a copy. We may then read an unbounded number of other lines (e.g., one for each modified file in the commit), each of whi