{"id":33307398,"url":"https://github.com/rafikdraoui/jj-diffconflicts","last_synced_at":"2026-01-16T16:35:17.486Z","repository":{"id":244307225,"uuid":"814652068","full_name":"rafikdraoui/jj-diffconflicts","owner":"rafikdraoui","description":"A conflict resolution merge tool for Jujutsu VCS that runs in Neovim","archived":false,"fork":false,"pushed_at":"2026-01-01T22:49:21.000Z","size":163,"stargazers_count":100,"open_issues_count":4,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-07T10:02:18.427Z","etag":null,"topics":["jujutsu","neovim","vimdiff"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rafikdraoui.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-06-13T12:31:44.000Z","updated_at":"2026-01-05T21:42:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"3d714d5e-e6c4-4041-ad1b-05c2b8103b0c","html_url":"https://github.com/rafikdraoui/jj-diffconflicts","commit_stats":null,"previous_names":["rafikdraoui/jj-diffconflicts"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rafikdraoui/jj-diffconflicts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafikdraoui%2Fjj-diffconflicts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafikdraoui%2Fjj-diffconflicts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafikdraoui%2Fjj-diffconflicts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafikdraoui%2Fjj-diffconflicts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rafikdraoui","download_url":"https://codeload.github.com/rafikdraoui/jj-diffconflicts/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafikdraoui%2Fjj-diffconflicts/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28479942,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["jujutsu","neovim","vimdiff"],"created_at":"2025-11-18T23:00:44.674Z","updated_at":"2026-01-16T16:35:17.468Z","avatar_url":"https://github.com/rafikdraoui.png","language":"Lua","funding_links":[],"categories":["Lua"],"sub_categories":[],"readme":"# jj-diffconflicts\n\n`jj-diffconflicts` is a merge tool for the [Jujutsu] version control system that runs in [Neovim].\nIt provides a two-way diff interface to resolve merge conflicts.\nIt is heavily inspired by Seth House's [diffconflicts] plugin, which provides the same functionality for the Git and Mercurial version control systems.\n\n## Motivation\n\nFor explanations about why a two-way diff based on conflict markers might be more effective than a standard 3-way diff that compares file content, you can consult the following resources:\n\n- The [\"Why?\" section][why] of the README of `whiteinge/diffconflicts`.\n- A [short video] demonstrating how it works, and how it helps honing on the relevant differences between the conflicted sides.\n- An [article] contrasting how different tools handle the same conflict.\n\nBut perhaps the best way is to [try it yourself](#test-repository).\n\n## Installation\n\n`jj-diffconflicts` requires Neovim v0.10.0 or above.\nIt can be installed like any other Neovim plugin.\n\nIt only supports conflicts that use the (default) \"diff\" conflict marker style (c.f. `ui.conflict-marker-style` configuration value).\nIf you use the \"git\" conflict marker style, then the [diffconflicts] plugin should be able to handle them.\n\n## Usage\n\nDocumentation is available through `:help jj-diffconflicts`.\n\n### Invoking from Neovim\n\nWhen a buffer with conflict markers is loaded, the merge resolution UI can be invoked through the `:JJDiffConflicts` command.\nThis will open a two-way diff in vertical splits that highlights the changes between the two sides of the conflict.\n\nTo resolve the conflict, edit the left side until it contains the desired changes.\nThen save it and exit Neovim with `:qa`.\nIf you want to abort without resolving the conflict, exit Neovim with `:cq` instead.\n\n### Invoking through `jj resolve`\n\nTo configure as a merge tool in Jujutsu, add the following to your [Jujutsu configuration]:\n\n```toml\n[merge-tools.diffconflicts]\nprogram = \"nvim\"\nmerge-args = [\n    \"-c\", \"let g:jj_diffconflicts_marker_length=$marker_length\",\n    \"-c\", \"JJDiffConflicts!\", \"$output\", \"$base\", \"$left\", \"$right\",\n]\nmerge-tool-edits-conflict-markers = true\n```\n\nIt can then be invoked with `jj resolve --tool diffconflicts`.\n\nThis uses the `:JJDiffConflicts!` variant of the command.\nIt works the same way as the base command.\nBut it also opens a history view in a separate tab that contains a 3-way diff between the two sides of the conflict and their common ancestor.\nThis can be useful to better understand how the two sides of the conflicts diverged, and can help with deciding which changes to keep on the left side of the two-way diff.\n\nIf you don't want to use the history view, you can instead set `merge-args` to `[\"-c\", \"JJDiffConflicts\", \"$output\"]`.\n\n## Test repository\n\nThe `make-conflicts.sh` script creates a Jujutsu repository in the `testrepo` directory whose working copy has conflicted files.\nIt can be used to try `jj-diffconflicts` (or any other merge tool).\n\nThe first file is `fruits.txt`, which contains the merge conflict described in the [Conflicts] section of Jujutsu's documentation.\n\nThe second file is `poem.txt`, which contains a tricky merge conflict.\nWhen resolving it, one should keep in mind the points from the [merge tools benchmarks] to judge its effectiveness.\n\nThe third file is `long_markers.txt`, which the contains the merge conflict described in the [Long conflict markers] section of the Jujutsu's documentation.\nIt can be used to test if the merge tool can handle markers of length higher than the default value.\n\nThe fourth file is `multiple_conflicts.txt`, which contains two conflict sections.\n\nThe fifth file is `missing_newline.txt`, which contains a conflict for which one side is missing a terminating newline character.\n\n## Troubleshooting\n\nThe plugin includes a health check to detect potential issues that would prevent it from functioning properly.\nIt can be invoked with `:checkhealth jj-diffconflicts`.\n\n## Limitations\n\n- It hasn't yet been used on a wide range of conflicts, so it's possible that it doesn't handle some situations very well.\n- It can only handle 2-sided conflicts (but this is also a limitation of `jj resolve`).\n- Jujutsu is still evolving, so future versions could bring changes that the plugin can't handle yet.\n  For example, conflict markers were changed between v0.17 and v0.18.\n\n_Caveat emptor_\n\n## Screenshots\n\n### Conflict resolution view\n\n![Conflict resolution view](./doc/diff-view.png)\n\n### History view\n\n![History view](./doc/history-view.png)\n\n### Default conflict markers (without plugin)\n\n![Default conflict markers](./doc/default-conflict-markers.png)\n\n[article]: https://www.eseth.org/2020/mergetools.html\n[conflicts]: https://jj-vcs.github.io/jj/latest/conflicts/#conflict-markers\n[diffconflicts]: https://github.com/whiteinge/diffconflicts/\n[jujutsu]: https://jj-vcs.github.io/jj/\n[jujutsu configuration]: https://jj-vcs.github.io/jj/latest/config/\n[long conflict markers]: https://jj-vcs.github.io/jj/latest/conflicts/#long-conflict-markers\n[merge tools benchmarks]: https://github.com/whiteinge/diffconflicts/blob/master/_utils/README.md#mergetool-benchmarks\n[neovim]: https://neovim.io/\n[short video]: https://www.youtube.com/watch?v=Pxgl3Wtf78Y\n[why]: https://github.com/whiteinge/diffconflicts/#why\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frafikdraoui%2Fjj-diffconflicts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frafikdraoui%2Fjj-diffconflicts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frafikdraoui%2Fjj-diffconflicts/lists"}