Re: [GSoC][PATCH 1/8] submodule--helper: introduce get_submodule_displaypath()
- From
Stefan Beller <sbeller@google.com>
- Date
- Jul 10, 2017, 23:38 UTC
- Message-ID
- <CAGZ79kYpFHkkhdkwYXEnQiWfuRONurintje575YVLE-ZVVRvzA@mail.gmail.com>
- In-Reply-To
- <20170710233247.GC161700@google.com>
On Mon, Jul 10, 2017 at 4:32 PM, Brandon Williams <bmwill@google.com> wrote:
Show 5 quoted lines
>> if (!is_submodule_active(the_repository, path)) {
>> - strbuf_reset(&sb);
>
> Is this line removal intended? It doesn't look related to the rest of
> this patch.It is, as &sb is re-used and has to be cleared first. With the code above removed, &sb is unmodified since struct strbuf sb = STRBUF_INIT; hence the removal is ok here. It is related, but only when looking at the entirety of the code. :-/