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

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

This is an automatically generated e-mail. To reply, visit:

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


This change has been marked as submitted.

Review request for KDevelop and Aleix Pol Gonzalez.


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:

REVIEW: 109529


  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 




Kevin Funk

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the KDevelop-devel mailing list