MCPcopy Create free account
hub / github.com/KDE/kdevelop / branch

Method branch

plugins/git/gitplugin.cpp:918–931  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

916}
917
918VcsJob* GitPlugin::branch(const QUrl& repository, const KDevelop::VcsRevision& rev, const QString& branchName)
919{
920 Q_ASSERT(!branchName.isEmpty());
921
922 auto* job = new GitJob(urlDir(repository), this);
923 *job << "git" << "branch" << "--" << branchName;
924
925 if(rev.revisionType() == VcsRevision::Special && rev.specialType() == VcsRevision::Head) {
926 *job << "HEAD";
927 } else if(!rev.prettyValue().isEmpty()) {
928 *job << rev.revisionValue().toString();
929 }
930 return job;
931}
932
933VcsJob* GitPlugin::deleteBranch(const QUrl& repository, const QString& branchName)
934{

Callers 5

createBranchMethod · 0.80
testBranchMethod · 0.80
testMergeMethod · 0.80
testStashMethod · 0.80

Calls 7

revisionTypeMethod · 0.80
specialTypeMethod · 0.80
prettyValueMethod · 0.80
revisionValueMethod · 0.80
urlDirFunction · 0.70
isEmptyMethod · 0.45
toStringMethod · 0.45

Tested by 4

testBranchMethod · 0.64
testMergeMethod · 0.64
testStashMethod · 0.64