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

Commit Hook null at kde.org
Mon Mar 18 00:03:53 UTC 2013


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

(Updated March 18, 2013, 12:03 a.m.)


Status
------

This change has been marked as submitted.


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.

Make clear that IBranchingVersionControl::currentBranch() will return an
empty string in case we're in detached state.

Add tests.

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

REVIEW: 109529


Diffs
-----

  plugins/git/gitplugin.cpp e2f9f1980c8a006128ce6ecce4e88f1f9964d715 
  plugins/git/tests/initTest.cpp c55264f3c6857b8ab73cfcdd241ac5224b897870 
  plugins/projectmanagerview/vcsoverlayproxymodel.cpp 81ad8dc7922c9e22d18317173ed76dc3b526164f 
  vcs/interfaces/ibranchingversioncontrol.h 04f80e4184daf64076c6b6882a28d13b18895b9d 
  vcs/models/projectchangesmodel.cpp 4d168cac30bae076640c51cfe5da53102fbd3ad4 

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/20130318/2585a042/attachment.html>


More information about the KDevelop-devel mailing list