Subject: Bug with `git branch HEAD` in a 'detached HEAD' state

From: Benoît Legat <[email-masked]>
Date: Thu, 15 Aug 2013 22:50:50 +0200

Hello everyone,

I think I have just found a bug in Git which basically occurs when I run 
`git log HEAD` in a detached HEAD state.
To reproduce it, just run
$ git init
...
$ touch tmp
...
$ git add tmp
$ git commit -m "tmp"
...
$ git checkout <commit_sha>
...
$ git branch HEAD
Segmentation fault (core dumped)

My version of git is the following
$ git --version
git version 1.8.1.2

If that helps (and even if it doesn't actually), I'm running ubuntu 
13.04 64-bit.

Benoît Legat