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

Method getDiffFiles

3rdparty/unioncode-GitQlient/src/git/GitHistory.cpp:119–133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117}
118
119GitExecResult GitHistory::getDiffFiles(const QString &sha, const QString &diffToSha)
120{
121 QLog_Debug("Git", QString("Getting modified files between SHAs: {%1} to {%2}").arg(sha, diffToSha));
122
123 auto runCmd = QString("git diff-tree -C --no-color -r -m ");
124
125 if (!diffToSha.isEmpty() && sha != CommitInfo::ZERO_SHA)
126 runCmd.append(diffToSha + " " + sha);
127 else
128 runCmd.append("4b825dc642cb6eb9a060e54bf8d69288fbee4904 " + sha);
129
130 QLog_Trace("Git", QString("Getting modified files between SHAs: {%1}").arg(runCmd));
131
132 return mGitBase->run(runCmd);
133}
134
135GitExecResult GitHistory::getUntrackedFileDiff(const QString &file) const
136{

Callers 6

cherryPickCommitMethod · 0.80
commitChangesMethod · 0.80
configureMethod · 0.80
commitChangesMethod · 0.80
insertFilesMethod · 0.80
cherryPickCommitMethod · 0.80

Calls 4

QStringClass · 0.50
isEmptyMethod · 0.45
appendMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected