Re: [PATCH] Fix `git rev-list --show-notes HEAD` when there are no notes
- From
Johan Herland <johan@herland.net>
- Date
- Aug 22, 2015, 16:30 UTC
- Message-ID
- <CALKQrgcvRvs8wLy-O2eZZg9iMG2T7coFMoFwmDu3nmAXHhdW1w@mail.gmail.com>
- In-Reply-To
- <0LZlZ2-1Z1Zyn1mzk-00lZ3Z@mail.gmx.com>
On Sat, Aug 22, 2015 at 5:14 PM, Johannes Schindelin <johannes.schindelin@gmx.de> wrote:
Show 12 quoted lines
> The `format_display_notes()` function clearly assumes that the data > structure holding the notes has been initialized already, i.e. that the > `display_notes_trees` variable is no longer `NULL`. > > However, when there are no notes whatsoever, this variable is still > `NULL`, even after initialization. > > So let's be graceful and just return if that data structure is `NULL`. > > Reported in https://github.com/msysgit/git/issues/363. > > Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Acked-by: Johan Herland <johan@herland.net>
-- Johan Herland, <johan@herland.net> www.herland.net