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

Method update

plugins/git/gitplugin.cpp:1733–1746  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1731}
1732
1733VcsJob* GitPlugin::update(const QList<QUrl>& localLocations, const KDevelop::VcsRevision& rev, IBasicVersionControl::RecursionMode recursion)
1734{
1735 if(rev.revisionType()==VcsRevision::Special && rev.revisionValue().value<VcsRevision::RevisionSpecialType>()==VcsRevision::Head) {
1736 return pull(VcsLocation(), localLocations.first());
1737 } else {
1738 auto* job = new GitJob(urlDir(localLocations.first()), this);
1739 {
1740 //Probably we should check first if origin is the proper remote we have to use but as a first attempt it works
1741 *job << "git" << "checkout" << rev.revisionValue().toString() << "--";
1742 *job << (recursion == IBasicVersionControl::Recursive ? localLocations : preventRecursion(localLocations));
1743 return job;
1744 }
1745 }
1746}
1747
1748void GitPlugin::setupCommitMessageEditor(const QUrl& localLocation, KTextEdit* editor) const
1749{

Callers 1

flushPendingMethod · 0.45

Calls 7

preventRecursionFunction · 0.85
revisionTypeMethod · 0.80
revisionValueMethod · 0.80
urlDirFunction · 0.70
VcsLocationClass · 0.50
firstMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected