Re: [PATCH v13 18/27] stash: convert create to builtin
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 11, 2019, 01:47 UTC
- Message-ID
- <xmqqimwqmbba.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <20190309182610.GD31533@hank.intra.tgummerer.com>
Thomas Gummerer <t.gummerer@gmail.com> writes:
Show 9 quoted lines
> 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?