Re: [PATCH v3 4/4] trace.c: be smart about what env to print in trace_run_command()
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Jan 13, 2018, 06:47 UTC
- Message-ID
- <CACsJy8Dc5gcaoKG6i7JoiuCaD2Xn-saeAgN=u2nK0zryiMJY3g@mail.gmail.com>
- In-Reply-To
- <CACsJy8CeYY34G=JjwHWqM+QbBG41pkW7VP+Aowak26rdM1qpPg@mail.gmail.com>
On Sat, Jan 13, 2018 at 11:54 AM, Duy Nguyen <pclouds@gmail.com> wrote:
Show 21 quoted lines
> On Sat, Jan 13, 2018 at 5:54 AM, Junio C Hamano <gitster@pobox.com> wrote: >> Jeff King <peff@peff.net> writes: >> >>> I also think this is a special case of a more general problem. FOO could >>> appear any number of times in the "env" array, as a deletion or with >>> multiple values. Our prep_childenv() would treat that as "last one >>> wins", I think. Could we just do the same here? >> >> Perhaps this should be squashed into the original 4/4 instead of >> being a separate patch. We'd probably want some sort of test, I >> wonder? Not tested at all beyond compiling... >> >> -- >8 -- >> Subject: [PATCH 7/4] run-command.c: don't be too cute in concatenate_env() >> >> Instead of relying on "sort" being stable to sort "unset VAR" >> immediately before "VAR=VAL" to remove the former, just pick the >> last manipulation for each VAR from the list of environment tweaks >> and show them in the output. > > This is not enough.
No it is. I misunderstood string_list_insert() and my tests proved me wrong. Sorry for the noise.
-- Duy