titan-data / titan

Titan is an open source project for developers to manage their data like code.
https://titan-data.io
Apache License 2.0
64 stars 14 forks source link

revision range for titan log #50

Open CloudSurgeon opened 5 years ago

CloudSurgeon commented 5 years ago

Problem

Be able to list titan commits between a certain range

Solution

Show only commits in the specified revision range. When no is specified, it defaults to all. ie titan log -1 ugdemo would only show the most recent commit.

Alternatives

Do nothing and use some complex awk/sed combo this shell oneliner returns the last commit titan log ugdemo | sed '/commit/h; $!d; x'| awk '{print $2}'

eschrock commented 5 years ago

Definitely have wanted something in this vein. The full suite of "commit limiting" features in 'git log' is mind-boggling:

https://git-scm.com/docs/git-log#_commit_limiting

We should pick a few basic ones to implement at first. Our CLI options framework may not like the "-1" style, but that is definitely what people are used to with git.