-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
gitlint </dev/null "fails" (as not sys.stdin.isatty()) #40
Labels
enhancement
User-facing feature enhancements
Comments
I'll need to look into this - not sure when I'll find the time though (might take a while). Marking as enhancement. |
jorisroovers
pushed a commit
that referenced
this issue
Dec 3, 2017
Before this commit, gitlint defaulted to reading the latest commit message from the local git repository when it found a TTY connected to STDIN, falling back to reading from STDIN in all other cases. With this commit, gitlint will do the opposite which is more sane: it will only read from STDIN in case there's input on STDIN, falling back to reading from the local git repo in all other cases. This is especially useful for environments where there is no TTY attached to STDIN like in many CI environments. This fixes #40, #42.
jorisroovers
added a commit
that referenced
this issue
Dec 3, 2017
#44) Before this commit, gitlint defaulted to reading the latest commit message from the local git repository when it found a TTY connected to STDIN, falling back to reading from STDIN in all other cases. With this commit, gitlint will do the opposite which is more sane: it will only read from STDIN in case there's input on STDIN, falling back to reading from the local git repo in all other cases. This is especially useful for environments where there is no TTY attached to STDIN like in many CI environments. This fixes #40, #42.
jorisroovers
added a commit
that referenced
this issue
Dec 3, 2017
Before this commit, gitlint defaulted to reading the latest commit message from the local git repository when it found a TTY connected to STDIN, falling back to reading from STDIN in all other cases. With this commit, gitlint will do the opposite which is more sane: it will only read from STDIN in case there's input on STDIN, falling back to reading from the local git repo in all other cases. This is especially useful for environments where there is no TTY attached to STDIN like in many CI environments. This fixes #40, #42.
jorisroovers
pushed a commit
that referenced
this issue
Dec 3, 2017
The 0.9.0 release adds a new default author-valid-email rule, important bugfixes and special case handling. Special thanks to joshholl, ron8mcr, omarkohl, domo141, nud and AlexMooney for their contributions. - New Rule: author-valid-email enforces a valid author email address. Details can be found in the Rules section of the documentation. - Breaking change**: The --commits commandline flag now strictly follows the refspec format as interpreted by the git rev-list <refspec> command. This means that linting a single commit using gitlint --commits <SHA> won't work anymore. Instead, for single commits, users now need to specificy gitlint --commits <SHA>^...<SHA>. On the upside, this change also means that gitlint will now understand all refspec formatters, including gitlint --commits HEAD to lint all commits in the repository. This fixes #23. - Breaking change**: Gitlint now always falls back on trying to read a git message from a local git repository, only reading a commit message from STDIN if one is passed. Before, gitlint only read from the local git repository when a TTY was present. This is likely the expected and desired behavior for anyone running gitlint in a CI environment. This fixes #40 and #42. - Behavior Change**: Gitlint will now by default ignore squash and fixup commits (fix for #33). - Support for custom comment characters (#34). - Support for 'git commit --cleanup=scissors' (#34). - Bugfix: #37: Prevent Commas in text fields from breaking git log printing - Debug output improvements Full Release details in CHANGELOG.md.
RykHawthorn
pushed a commit
to RykHawthorn/gitlint
that referenced
this issue
Jan 12, 2018
The 0.9.0 release adds a new default author-valid-email rule, important bugfixes and special case handling. Special thanks to joshholl, ron8mcr, omarkohl, domo141, nud and AlexMooney for their contributions. - New Rule: author-valid-email enforces a valid author email address. Details can be found in the Rules section of the documentation. - Breaking change**: The --commits commandline flag now strictly follows the refspec format as interpreted by the git rev-list <refspec> command. This means that linting a single commit using gitlint --commits <SHA> won't work anymore. Instead, for single commits, users now need to specificy gitlint --commits <SHA>^...<SHA>. On the upside, this change also means that gitlint will now understand all refspec formatters, including gitlint --commits HEAD to lint all commits in the repository. This fixes jorisroovers#23. - Breaking change**: Gitlint now always falls back on trying to read a git message from a local git repository, only reading a commit message from STDIN if one is passed. Before, gitlint only read from the local git repository when a TTY was present. This is likely the expected and desired behavior for anyone running gitlint in a CI environment. This fixes jorisroovers#40 and jorisroovers#42. - Behavior Change**: Gitlint will now by default ignore squash and fixup commits (fix for jorisroovers#33). - Support for custom comment characters (jorisroovers#34). - Support for 'git commit --cleanup=scissors' (jorisroovers#34). - Bugfix: jorisroovers#37: Prevent Commas in text fields from breaking git log printing - Debug output improvements Full Release details in CHANGELOG.md.
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
There are many cases (e.g. automated checks) where stdio is not attached to tty (and e.g. --commits is to be used), where it would be nice that this worked; current workaround is
script -ec 'gitlint'
(works when linux script(1) is new enough to know -e option).Looks like current HEAD (b054219) has some changes which shows where this problem occurs, it looks these changes do not fix this issue.
The text was updated successfully, but these errors were encountered: