fix: correct exclude-to, include-to revision when get commits

main
hau 2020-11-10 23:33:35 +07:00
parent b06387dff2
commit 53dcb52d50
1 changed files with 3 additions and 3 deletions

View File

@ -117,12 +117,12 @@ func (a *action) getCommits(c *cli.Context, path string) ([]git.Commit, error) {
return nil, errors.New("excludeToFlag and includeToFlag can not appear same time")
}
if excludeToFlag != "" {
if excludeToRev != "" {
return r.LogExcludeTo(fromRev, excludeToRev)
}
if includeToFlag != "" {
return r.LogIncludeTo(fromRev, includeToFlag)
if includeToRev != "" {
return r.LogIncludeTo(fromRev, includeToRev)
}
return r.Log(fromRev)