MCPcopy Create free account
hub / github.com/SpartanJ/eepp / diff

Method diff

src/tools/ecode/plugins/git/gitplugin.cpp:1083–1105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1081}
1082
1083void GitPlugin::diff( const Git::DiffMode mode, const std::string& repoPath ) {
1084 mThreadPool->run( [this, mode, repoPath] {
1085 auto res = mGit->diff( mode, repoPath );
1086 if ( res.fail() )
1087 return;
1088
1089 std::string repoName = this->repoName( repoPath );
1090 getUISceneNode()->runOnMainThread( [this, mode, res, repoName] {
1091 std::string modeName;
1092 switch ( mode ) {
1093 case Git::DiffHead: {
1094 modeName = "HEAD";
1095 break;
1096 }
1097 case Git::DiffStaged:
1098 modeName = "staged";
1099 break;
1100 }
1101 getPluginContext()->loadDiffFromMemory(
1102 res.result, UIDiffView::isMultiFileDiff( res.result ) ? modeName : "" );
1103 } );
1104 } );
1105}
1106
1107void GitPlugin::diff( const std::string& file, Git::GitStatusType status ) {
1108 mThreadPool->run( [this, file, status] {

Callers

nothing calls this directly

Calls 7

repoNameMethod · 0.95
failMethod · 0.80
runOnMainThreadMethod · 0.80
loadDiffFromMemoryMethod · 0.80
loadDiffFromPathsMethod · 0.80
runMethod · 0.45
repoPathMethod · 0.45

Tested by

no test coverage detected