ansible/ansible — pull request #1414 by sfromm (2012-10-22 23:11:57+00:00)
Title: Help git module work when working in 'no branch' scenario

Detect when on a 'no branch' branch. If so, checkout the HEAD branch
as reported by 'git remote show '. That should put the repo
back on a branch such that git can then merge changes as necessary.
In addition, removed hard-coded references to origin and replaced
with remote var.

See issue #1412.