Note that, in case of a "git pull --rebase" run while the HEAD is detached, Git tried to find the upstream branch of the detached HEAD (which by definition does not exist) and emitted unnecessary error messages.
This is no longer the case with Git1.8.0.1 (26th November 2012)