stash: pass pathspec as pointer
authorThomas Gummerer <t.gummerer@gmail.com>
Mon, 11 Mar 2019 22:16:32 +0000 (22:16 +0000)
committerJunio C Hamano <gitster@pobox.com>
Tue, 12 Mar 2019 06:49:05 +0000 (15:49 +0900)
commit7db9302d7cc7affeb1d576a050407f40404bd20f
tree1848804b21839e5e2da33446bc8ae71b4d627f67
parent1366c78c239e7abb24d5b74cedf237f82125492d
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.

Reported-by: Jeff King <peff@peff.net>
Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/stash.c