-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
Bugthing that needs fixingthing that needs fixing
Description
What / Why
Often times our "parent" file contains the closing } but not the opening {. The opening { is instead part of the "ours" and theirs" files. Since the closing } is common, it is part of "parent". Because of this, the "parent" file is invalid JSON and the function fails.
Where
- npm/parse-conflict-json
How
Current Behavior
parseConflictJSON fails because the parent file is includes the common ending }.
Steps to Reproduce
Pass the following string to parseConflictJSON
{
"/ikB9l": {
"message": "first"
},
<<<<<<< HEAD
"/ikD9l": {
"message": "second!"
},
"/ikE9l": {
"message": "third"
=======
"/ikB9m": {
"message": "2 second"
},
"/ikB9p": {
"message": "2 third"
>>>>>>> git-conflict-2
},
"+BB+Te": {
"message": "last"
}
}
Expected Behavior
Since this is a common conflict for our use case, ideally this would be resolved without throwing an error. Removing parsing the "parent" and just merging "ours" and "theirs" fixes the issue for us. Not sure what would be ideal for this library.
Metadata
Metadata
Assignees
Labels
Bugthing that needs fixingthing that needs fixing