You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
where upstream/master and HEAD is the same commit.
Error
...
...
File "/home/tommy/Documents/gitlint/gitlint/cli.py", line 114, in lint
last_commit = gitcontext.commits[-1]
IndexError: list index out of range
Solution
Either just tell the user there is no commit in the range or lint the HEAD commit. I prefer the second option but some user might find that inconsistent with how Git's range work.
The text was updated successfully, but these errors were encountered:
Confirmed. @tommyip were you planning to look into this? If not, I can see if I can make some time later this week. We should probably fix this for the upcoming 0.8.1. release. Also, I'd vote for the first option, just telling the user there is no commit as a check for len(gitcontext.commits) > 0 will capture more use cases in general.
Command
where
upstream/master
andHEAD
is the same commit.Error
Solution
Either just tell the user there is no commit in the range or lint the HEAD commit. I prefer the second option but some user might find that inconsistent with how Git's range work.
The text was updated successfully, but these errors were encountered: