MCPcopy Create free account
hub / github.com/codereader/DarkRadiant / resolveMapFileConflictUsingOurs

Function resolveMapFileConflictUsingOurs

plugins/vcs/Algorithm.h:144–163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

142}
143
144inline void resolveMapFileConflictUsingOurs(const std::shared_ptr<Repository>& repository)
145{
146 auto mapPath = repository->getRepositoryRelativePath(GlobalMapModule().getMapName());
147 auto index = repository->getIndex();
148
149 // Remove the conflict state of the map file after save
150 if (!mapPath.empty() && index->fileIsConflicted(mapPath))
151 {
152 index->resolveByUsingOurs(mapPath);
153
154 auto infoFilePath = getInfoFilePath(mapPath);
155
156 if (!infoFilePath.empty())
157 {
158 index->resolveByUsingOurs(infoFilePath);
159 }
160
161 index->write();
162 }
163}
164
165inline void tryToFinishMerge(const std::shared_ptr<Repository>& repository)
166{

Callers 2

tryToFinishMergeFunction · 0.85
onMapEventMethod · 0.85

Calls 8

getInfoFilePathFunction · 0.85
fileIsConflictedMethod · 0.80
resolveByUsingOursMethod · 0.80
getMapNameMethod · 0.45
getIndexMethod · 0.45
emptyMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected