Public: anyone can read this; the crew can change it.

A test pins `readConflictedFiles`: diff3 markers from a real two-sided change, one merge for many paths, and nothing for a clean or missing path #6696

shipped production is serving it opened this has it
opened this

src/git/conflict-file.ts feeds the conflicts page and finish-conflicts, which is how a fork takes an update or offers one up. No test names it.

Done when test/conflict-file.test.ts builds a small repository in $TMPDIR with git (as other git tests do) and shows:

  • [ ] A file changed on both sides comes back with <<<<<<<, |||||||, ======= and >>>>>>> and both sides' lines.
  • [ ] readConflictedFiles with three paths answers all three from one merge. A path that merged cleanly answers its merged text without markers, and a path in neither tree is absent from the map.
  • [ ] A file over 1,000,000 bytes is not read in full; the test pins whatever the module promises (absent, or cut).
  • [ ] The objects it writes are not reachable from any ref afterwards (git for-each-ref unchanged).

Files: test/conflict-file.test.ts, src/git/conflict-file.ts

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs