3-way merge
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript
- Domain
- tooling
Research direction
Start with the issue's proposed JsDiff.merge(commonAncestor, x_patches, y_patches [, options]) API and review the linked explanation of Git merge behavior. Define how patches from both branches combine, how conflicts are represented using mergePattern, and what tests would demonstrate correct results before implementing the feature.
Written by the indexing model from the issue text.
Description
This is a feature request.
Given a common ancestor and 2 sets of patches, provide a merged document that may include conflicts to resolve manually.
This would be useful to allow two or more users collaborate on the edition of a document, implementing an equivalent of git merge.
It is assumed that the most recent common ancestor is know and provided as a parameter:
JsDiff.merge( commonAncestor, x_patches, y_patches [, options] )
Where x_patches and y_patches are Arrays of patches for the x and y branches from the common ancestor,
Options may be used to provide a manual merge patterns which could default to:
mergePattern: [ "<<<<<<< x", "=======", ">>>>>>> y" ]
For the algorithm, see https://www.quora.com/How-does-Git-merge-work.
- Dominant language
- JavaScript
- Stars
- 9.2k
- Forks
- 555
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 5
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from kpdecker/jsdiff
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
kpdecker/jsdiff#703 · 1 reaction ·
Maintainers usually reply within 1 day
-
Applying a patch with a fuzzFactor can be very very slowPossibly taken @json-open-source claimed this 39 days ago. Openperformance
Difficulty 4/5 3-5 days Newbie friendliness 48/100
kpdecker/jsdiff#692 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 45/100
kpdecker/jsdiff#684 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
kpdecker/jsdiff#629 · 7 comments ·
Maintainers usually reply within 1 day
Similar issues
-
channels:edit check:passed
Difficulty 1/5 Under an hour Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 94/100
lidofinance/docs#1033 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day