Skip to content

Commit

Permalink
support no range
Browse files Browse the repository at this point in the history
(cherry picked from commit aa3aba7)
  • Loading branch information
Kelly Selden authored and kellyselden committed Oct 31, 2023
1 parent 0bc99ef commit fd4f3e3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -303,12 +303,12 @@ function fixtureCompare({
function replaceConflictRevisions(tree) {
for (let [path, textOrDir] of Object.entries(tree)) {
if (typeof textOrDir === 'string') {
let replaceValue = '>>>>>>> fffffff ($<from>...$<to>)';
let replaceValue = '>>>>>>> fffffff ($1)';

// normalize a format found on AppVeyor
textOrDir = textOrDir.replace(/^>>>>>>> [0-9a-f]{7}\.{3} (?<from>\S+)\.{3}(?<to>\S+)$/m, replaceValue);
textOrDir = textOrDir.replace(/^>>>>>>> [0-9a-f]{7}\.{3} (\S+)$/m, replaceValue);

tree[path] = textOrDir.replace(/^>>>>>>> [0-9a-f]{7} \((?<from>\S+)\.{3}(?<to>\S+)\)$/m, replaceValue);
tree[path] = textOrDir.replace(/^>>>>>>> [0-9a-f]{7} \((\S+)\)$/m, replaceValue);
} else {
replaceConflictRevisions(textOrDir);
}
Expand Down

0 comments on commit fd4f3e3

Please sign in to comment.