mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Clemmer" <>
Subject Re: Review Request 40195: Changed commit hook linting to ignore empty diffs.
Date Wed, 09 Dec 2015 23:01:52 GMT

This is an automatically generated e-mail. To reply, visit:

(Updated Dec. 9, 2015, 11:01 p.m.)

Review request for mesos, Artem Harutyunyan, Michael Hopcroft, Joris Van Remoortere, and Joseph

Repository: mesos

Description (updated)

On Windows, if you attempt to commit an empty changeset, the commit hooks will
attempt to lint the entire repository. This is because we pass blank arguments
to the call to `xargs` that kicks off the C++ linter (e.g., in
`support/pre-commit`). In the git bash, the default behavior of blank arguments
is *not* to ignore them, as it is on certain other platforms. Note that the
`-r` flag is provided to avoid this behavior, but it is only available on
some platforms, and hence is inadmissable here.

Hence, our solution is to check if the results of `git diff` are empty, and
only call `` if not.


  support/hooks/post-rewrite 7df1e0f29c6ce940a364c0b1d312251c6160e5e3 
  support/hooks/pre-commit ca9e9810aca921734be5224e3ef71fe7ff4aa03d 



Branches tested manually.


Alex Clemmer

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message