MCPcopy Create free account
hub / github.com/Codeya-IDE/deepin-ide / merge

Method merge

3rdparty/unioncode-GitQlient/src/git/GitMerge.cpp:25–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23}
24
25GitExecResult GitMerge::merge(const QString &into, QStringList sources)
26{
27 QLog_Debug("Git", QString("Executing merge: {%1} into {%2}").arg(sources.join(","), into));
28
29 {
30 const auto cmd = QString("git checkout -q %1").arg(into);
31
32 QLog_Trace("Git", QString("Checking out the current branch: {%1}").arg(cmd));
33
34 const auto retCheckout = mGitBase->run(cmd);
35
36 if (!retCheckout.success)
37 return retCheckout;
38 }
39
40 const auto cmd2 = QString("git merge -Xignore-all-space ").append(sources.join(" "));
41
42 QLog_Trace("Git", QString("Merging ignoring spaces: {%1}").arg(cmd2));
43
44 const auto retMerge = mGitBase->run(cmd2);
45
46 if (retMerge.success)
47 {
48 QScopedPointer<GitWip> git(new GitWip(mGitBase, mCache));
49 git->updateWip();
50 }
51
52 return retMerge;
53}
54
55GitExecResult GitMerge::abortMerge() const
56{

Callers 1

acceptMethod · 0.45

Calls 4

QStringClass · 0.50
runMethod · 0.45
appendMethod · 0.45
updateWipMethod · 0.45

Tested by

no test coverage detected