From: Johan Herland Date: Sat, 22 Aug 2015 16:30:41 GMT Subject: Re: [PATCH] Fix `git rev-list --show-notes HEAD` when there are no notes Message-ID: In-Reply-To: <0LZlZ2-1Z1Zyn1mzk-00lZ3Z@mail.gmx.com> On Sat, Aug 22, 2015 at 5:14 PM, Johannes Schindelin wrote: > 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 Acked-by: Johan Herland -- Johan Herland, www.herland.net