[bug] git checkout lies about number of ahead commits when switching from detached HEAD
- From
Piotr Krukowiecki <piotr.krukowiecki@gmail.com>
- Date
- Mar 19, 2011, 21:53 UTC
- Message-ID
- <4D8525C9.2060203@gmail.com>
It says "by 0 commits" when going back from detached HEAD to master branch:
$ git checkout HEAD^
$ git checkout master
Previous HEAD position was af4c62a... Merge branch 'maint'
Switched to branch 'master'
Your branch is ahead of 'origin/master' by 0 commits.
^^^^^^^^^^^^$ git status
# On branch master
# Your branch is ahead of 'origin/master' by 1 commit.
^^^^^^^^^^^# nothing to commit (working directory clean)
-- Piotr Krukowiecki