Review Request 109529: GitPlugin: Fix branch name in detached HEAD state

Kevin Funk krf at gmx.de
Sat Mar 16 22:01:43 UTC 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/109529/
-----------------------------------------------------------

Review request for KDevelop and Aleix Pol Gonzalez.


Description
-------

GitPlugin: Fix branch name in detached HEAD state

In case of detached HEAD, 'git symbolic-ref HEAD' will error out.
Instead, use 'git rev-parse' to retrieve the current branch, will output
"HEAD" in case of detached HEAD state.

Add tests.

Also see: http://stackoverflow.com/a/11958481


Diffs
-----

  plugins/git/gitplugin.cpp e2f9f1980c8a006128ce6ecce4e88f1f9964d715 
  plugins/git/tests/initTest.cpp c55264f3c6857b8ab73cfcdd241ac5224b897870 

Diff: http://git.reviewboard.kde.org/r/109529/diff/


Testing
-------


Thanks,

Kevin Funk

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20130316/e88841d4/attachment.html>


More information about the KDevelop-devel mailing list