MCPcopy Create free account
hub / github.com/ReZeroS/git / mergeBlobs

Method mergeBlobs

src/main/java/club/qqtim/diff/DiffUtil.java:158–164  ·  view source on GitHub ↗

diff3 @param fromBlob from blob id @param toBlob to blob id @return merged blob content https://blog.jcoglan.com/2017/05/08/merging-with-diff3/

(String baseBlob, String fromBlob, String toBlob)

Source from the content-addressed store, hash-verified

156 * https://blog.jcoglan.com/2017/05/08/merging-with-diff3/
157 */
158 public static String mergeBlobs(String baseBlob, String fromBlob, String toBlob) {
159
160 final List<LineObject> originalLines = convertObjectContentToLines(baseBlob);
161 final List<LineObject> headLines = convertObjectContentToLines(fromBlob);
162 final List<LineObject> otherLines = convertObjectContentToLines(toBlob);
163 return mergeBlobs(originalLines, headLines, otherLines);
164 }
165
166 public static String mergeBlobs(List<LineObject> originalLines, List<LineObject> headLines, List<LineObject> otherLines) {
167

Callers 1

mergeTreesMethod · 0.95

Calls 5

diffBlobsMethod · 0.95
nextMisMatchMethod · 0.95
nextMatchMethod · 0.95
buildChunkMethod · 0.95

Tested by

no test coverage detected