From: Jeff King Date: Wed, 20 Jul 2016 16:06:36 GMT Subject: Re: [PATCH v1 4/6] Expanded branch header for Porcelain Status V2 Message-ID: <20160720160635.GC24902@sigill.intra.peff.net> In-Reply-To: <1468966258-11191-5-git-send-email-jeffhost@microsoft.com> On Tue, Jul 19, 2016 at 06:10:56PM -0400, Jeff Hostetler wrote: > + } else { > + /* > + * TODO All of various print routines allow for s->branch to be null. > + * TODO When can this happen and what should we report here? > + */ > + fprintf(s->fp, " %s", "(unknown)"); > + } IIRC, it happens when HEAD points to a broken ref. So something like: git init echo broken >.git/refs/heads/master would cause resolving HEAD to return NULL. -Peff