<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://git.reviewboard.kde.org/r/109653/">http://git.reviewboard.kde.org/r/109653/</a>
     </td>
    </tr>
   </table>
   <br />





 <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I think this change is not quite correct. There's a similar error further down. In both cases what Aleix probably wanted is out.left() and not out.right. The change further down seems to try to remove the "* " that denotes the currently active branch by removing the two characters.

This particular one, according to the history, comes from a failed attempt to support branches with slashes. If I understand the original code that was applied to the result of "git branch -a":
-        QString out = job->output();
-        int slashPos = out.lastIndexOf('/')+1;
-        kDebug() << "Getting branch list" << out.mid(slashPos, out.size()-slashPos).trimmed();
-        return out.mid(slashPos, out.size()-slashPos).trimmed();

It simply tried to remove the remote name from the output. So even if Aleix would've correctly use left instead of right, cutting an arbitrary number of characters is never going to be correct. The right fix would be to adjust the above original code to fetch the names of all remotes and remove those from the beginning of the branch names.
</pre>
 <br />









<p>- Andreas</p>


<br />
<p>On March 22nd, 2013, 10:06 a.m. UTC, Alexander Mezin wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
 <tr>
  <td>

<div>Review request for KDevelop and Aleix Pol Gonzalez.</div>
<div>By Alexander Mezin.</div>


<p style="color: grey;"><i>Updated March 22, 2013, 10:06 a.m.</i></p>






<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Git plugin did strange things with current branch name.
I had a branch with long name, and KDevelop displayed only 2 last chars.</pre>
  </td>
 </tr>
</table>





<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>plugins/git/gitplugin.cpp <span style="color: grey">(c873081)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/109653/diff/" style="margin-left: 3em;">View Diff</a></p>







  </td>
 </tr>
</table>








  </div>
 </body>
</html>