On Fri, Oct 20, 2017 at 04:09:30PM +0300, Andrey Okoshkin wrote: > Add check of the resolved HEAD reference while printing of a commit summary. > resolve_ref_unsafe() may return NULL pointer if underlying calls of lstat() or > open() fail in files_read_raw_ref(). > Such situation can be caused by race: file becomes inaccessible to this moment. > > Signed-off-by: Andrey Okoshkin <a.okoshkin@xxxxxxxxxxx> > --- > Hello, > I think this way is better for user experience: > * git doesn't crash; > * warning is shown; > * commit has been successfully created then it's safe to show a summary message > with already known information and without resolved HEAD. I'm on the fence between this and the die_errno() version. Given that this would basically never happen in practice, I don't think it matters too much. And that makes me want to just err on the side of simplicity. But it's not like this is all that complex, either. -Peff