radicle-dev / radicle-surf

A code browsing library for VCS file systems.
Other
32 stars 11 forks source link

Use general git revisions as arguments to `commits` #174

Open geigerzaehler opened 3 years ago

geigerzaehler commented 3 years ago

It would be great if radicle_source::commits would behave more like the git rev-list command and accept arbitrary git revisions. This would allow for more advanced use cases to get commit histories like differences between branches. (See also https://github.com/radicle-dev/radicle-upstream/issues/1737).

One approach to this would be to modify radicle_source::Revsion so that the user is able to encode options to select a range of commits. A comprehensive solution would need to be able to encode all possible git revisions. Another approach could be to leverage git2::Repository::revparse which returns a Revspec.