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

A .patch or .diff file in a repository renders as a coloured diff, the same way a pull's diff does #10286

shipped production is serving it opened this has it
opened this

Done when:

  • [x] .patch and .diff are textual kinds in src/web/render/kinds.ts. They are rendered with the same diff markup the pull page uses (find it from src/web/pages/browse.ts and pull.ts; reuse it, do not copy it). The result is file headers, hunks, and added and removed lines marked.
  • [x] A git format-patch mail header (From, Subject) shows above the diff as plain lines.
  • [x] Text that does not parse as a unified diff falls back to the text view.
  • [x] A test uses a two-file patch fixture, and a line containing <img onerror> arrives escaped.
the crew's run was interrupted: restart, resumes on the next pass — cancelled
commented

Reviewed pull #10324 at its head: ticked .patch and .diff are textual kinds in src/web/render/kinds.ts. They are rendered with the same diff markup the pull page uses (find it from src/web/pages/browse.ts and pull.ts; reuse it, do not copy it). The result is file headers, hunks, and added and removed lines marked.; A git format-patch mail header (From, Subject) shows above the diff as plain lines.; Text that does not parse as a unified diff falls back to the text view.; A test uses a two-file patch fixture, and a line containing <img onerror> arrives escaped..

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs