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

Method currentBranch

plugins/git/gitplugin.cpp:967–974  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

965}
966
967VcsJob* GitPlugin::currentBranch(const QUrl& repository)
968{
969 auto* job = new GitJob(urlDir(repository), this, OutputJob::Silent);
970 job->setIgnoreError(true);
971 *job << "git" << "symbolic-ref" << "-q" << "--short" << "HEAD";
972 connect(job, &DVcsJob::readyForParsing, this, &GitPlugin::parseGitCurrentBranch);
973 return job;
974}
975
976void GitPlugin::parseGitCurrentBranch(DVcsJob* job)
977{

Callers 6

testBranchMethod · 0.45
testMergeMethod · 0.45
testBranchingMethod · 0.45
testStashMethod · 0.45

Calls 2

setIgnoreErrorMethod · 0.80
urlDirFunction · 0.70

Tested by 4

testBranchMethod · 0.36
testMergeMethod · 0.36
testBranchingMethod · 0.36
testStashMethod · 0.36