Re: [PATCH v13 18/27] stash: convert create to builtin
- From
Thomas Gummerer <t.gummerer@gmail.com>
- Date
- Mar 11, 2019, 21:42 UTC
- Message-ID
- <20190311214244.GB16414@hank.intra.tgummerer.com>
- In-Reply-To
- <xmqqd0mxkgvy.fsf@gitster-ct.c.googlers.com>
On 03/11, Junio C Hamano wrote:
Show 19 quoted lines
> Junio C Hamano <gitster@pobox.com> writes: > > > Thomas Gummerer <t.gummerer@gmail.com> writes: > > > >> Subject: [PATCH 1/2] stash: pass pathspec as pointer > >> > >> Passing the pathspec by value is potentially confusing, as the copy is > >> only a shallow copy, so save the overhead of the copy, and pass the > >> pathspec struct as a pointer. > >> > >> In addition use copy_pathspec to copy the pathspec into > >> rev.prune_data, so the copy is a proper deep copy, and owned by the > >> revision API, as that's what the API expects. > > > > It does make quite a lot of sense, but do we need clear_pathspec() > > at strategic places after we are done using these copied instances? > > Another thing is that this also needs Dscho's fix to pass down the > pathspec that was originally given, not the parsed part.
Good catch on both acconts. I'll send a new patch soon, adding the clear_pathspec() calls and rebasing it on top of Dscho's fix.