MCPcopy Create free account
hub / github.com/KDE/kate / parseRemoteBranch

Function parseRemoteBranch

addons/project/git/gitutils.cpp:102–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100}
101
102static GitUtils::Branch parseRemoteBranch(QLatin1String raw)
103{
104 static const int len = sizeof("refs/remotes/") - 1;
105 int indexofRemote = raw.indexOf(u'/', len);
106 return GitUtils::Branch{.name = raw.mid(len), .remote = raw.mid(len, indexofRemote - len), .refType = GitUtils::Remote, .lastCommit = QString()};
107}
108
109QList<GitUtils::Branch> GitUtils::getAllBranchesAndTags(const QString &repo, RefType ref)
110{

Callers 1

getAllBranchesAndTagsMethod · 0.85

Calls 2

indexOfMethod · 0.80
QStringClass · 0.50

Tested by

no test coverage detected