src/utils/conflict.js
function _compareTrees(parentEntries, baseEntries, headEntries) {
    const headDiff = _diffEntries(parentEntries, headEntries);
    const baseDiff = _diffEntries(parentEntries, baseEntries);

    // Conflicting paths are paths...
    // ... modified by both branches
    const headSet = Immutable.Set.fromKeys(headDiff);
    const baseSet = Immutable.Set.fromKeys(baseDiff);
    const conflictSet = headSet.intersect(baseSet).filter((filepath) => {
        // ...in different manners
        return !Immutable.is(headDiff.get(filepath), baseDiff.get(filepath));
    });

    // Create the map of Conflict
    return (new Immutable.Map()).withMutations((map) => {
        return conflictSet.reduce((map, filepath) => {
            const shas = [
                parentEntries,
                baseEntries,
                headEntries
            ].map(function getSha(entries) {
                if (!entries.has(filepath)) return null;
                return entries.get(filepath).getSha() || null;
            });

            return map.set(filepath, Conflict.create.apply(undefined, shas));
        }, map);
    });
}
function _compareTrees(parentEntries, baseEntries, headEntries) {
    const headDiff = _diffEntries(parentEntries, headEntries);
    const baseDiff = _diffEntries(parentEntries, baseEntries);

    // Conflicting paths are paths...
    // ... modified by both branches
    const headSet = Immutable.Set.fromKeys(headDiff);
    const baseSet = Immutable.Set.fromKeys(baseDiff);
    const conflictSet = headSet.intersect(baseSet).filter((filepath) => {
        // ...in different manners
        return !Immutable.is(headDiff.get(filepath), baseDiff.get(filepath));
    });

    // Create the map of Conflict
    return (new Immutable.Map()).withMutations((map) => {
        return conflictSet.reduce((map, filepath) => {
            const shas = [
                parentEntries,
                baseEntries,
                headEntries
            ].map(function getSha(entries) {
                if (!entries.has(filepath)) return null;
                return entries.get(filepath).getSha() || null;
            });

            return map.set(filepath, Conflict.create.apply(undefined, shas));
        }, map);
    });
}
---- Auxiliaries ---- 
@param {Map<Path, TreeEntry>} parentEntries
@param {Map<Path, TreeEntry>} baseEntries
@param {Map<Path, TreeEntry>} headEntries
@return {Map<Path, Conflict>} The minimal set of conflicts.