This is an overhaul of the diff module. The major changes are as follows. It shouldn't be possible for an added or deleted file to have any other kind line changes other than additions or deletions. So there are now 3 different kinds of changes, Addition, Deletion, or Modification. Hunk and Hunks now take a generic type parameter to allow for the three types of changes. As a consequence a FileDiff does the same. For the actual file representations, they fill in their parameters as Addition, Deletion, or Modification. During this refactor some renaming was also made: * CreateFile -> Added -- as well as the created field being renamed to added. * DeleteFile -> Deleted * MoveFile -> Moved * CopyFile -> Copied * ModifiedFile -> Modified The Stats are also now carried in the Diff instead of being calculated. They can be retrieved from the `git2::Diff`. The final change was to remove the `source::Commit::stats` field in favour of accessing the `Diff::stats` instead. The above changes mean that the serialization of `Diff` and `Commit` are not backwards compatible. Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com> X-Clacks-Overhead: GNU Terry Pratchett
radicle-surf
A code surfing library for Git repositories 🏄♀️🏄♂️
Welcome to radicle-surf!
radicle-surf is a library to describe a Git repository as a file system. It
aims to provide an easy-to-use API to browse a repository via the concept of
files and directories for any given revision. It also allows the user to diff
any two different revisions.
One of the use cases would be to create a web GUI for interacting with a Git repository (thinking GitHub, GitLab or similar systems).
Contributing
To get started on contributing you can check out our developing guide, and also our LICENSE file.
The Community
Join our community disccussions at radicle.community!
Example
To a taste for the capabilities of radicle-surf we provide an example below, but we also
keep our documentation and doc-tests up to date.