[[ 🏗
=br6Go Vervis
]] ::
[📥 Inbox]
[📤 Outbox]
[🐤 Followers]
[🤝 Collaborators]
[🐛 Tickets]
[📖 Wiki]
[✏ Edit]
How to represent a commit/patch for UI
Created on 2019-10-30 by
~fr33domlover
At the time of writing, there’s a single representation of patches/commits for UI display, via the Edit
type defined in Vervis.Patch
. That representation is based on Git, and doesn’t exactly match the way patches are defined in Darcs. What do we do about it? Ideas:
- Adapt Darcs patches to the Git-based representation, by joining hunks and joining AddFile items with the corresponding hunk
- Switch to a Darcs-based representation, maybe except for hunks being joined and arrange by file, and adapt Git commits to it, by representing “add a text file” as a pair of AddFile and EditFile
- Have 2 separate representations
Also, if we want to have a JSON representation for ForgeFed, perhaps it’s a good idea to have a shared type, and carefully pick the kinds of changes that it allows.
Status: Open