You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Alex Clemmer <cl...@gmail.com> on 2015/11/16 09:30:19 UTC

Review Request 40195: Changed commit hook linting to ignore empty diffs.

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40195/
-----------------------------------------------------------

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


Repository: mesos


Description
-------

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.

Thus, we pass the `-r` flag in explicitly to `xargs`, which causes us to ignore
whitespace-only calls to `xargs`. This will remove the whole-repository linting
problem altogether.


Diffs
-----

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

Diff: https://reviews.apache.org/r/40195/diff/


Testing
-------

Branches tested manually.


Thanks,

Alex Clemmer


Re: Review Request 40195: Changed commit hook linting to ignore empty diffs.

Posted by Mesos ReviewBot <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40195/#review106621
-----------------------------------------------------------


Patch looks great!

Reviews applied: [40131, 40195]

All tests passed.

- Mesos ReviewBot


On Nov. 16, 2015, 8:30 a.m., Alex Clemmer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40195/
> -----------------------------------------------------------
> 
> (Updated Nov. 16, 2015, 8:30 a.m.)
> 
> 
> Review request for mesos, Artem Harutyunyan, Michael Hopcroft, Joris Van Remoortere, and Joseph Wu.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> 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.
> 
> Thus, we pass the `-r` flag in explicitly to `xargs`, which causes us to ignore
> whitespace-only calls to `xargs`. This will remove the whole-repository linting
> problem altogether.
> 
> 
> Diffs
> -----
> 
>   support/hooks/post-rewrite 7df1e0f29c6ce940a364c0b1d312251c6160e5e3 
>   support/hooks/pre-commit ca9e9810aca921734be5224e3ef71fe7ff4aa03d 
> 
> Diff: https://reviews.apache.org/r/40195/diff/
> 
> 
> Testing
> -------
> 
> Branches tested manually.
> 
> 
> Thanks,
> 
> Alex Clemmer
> 
>


Re: Review Request 40195: Changed commit hook linting to ignore empty diffs.

Posted by Joseph Wu <jo...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40195/#review106916
-----------------------------------------------------------

Ship it!


Checked that empty commits do not lint everything. (OSX)

- Joseph Wu


On Nov. 16, 2015, 12:30 a.m., Alex Clemmer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40195/
> -----------------------------------------------------------
> 
> (Updated Nov. 16, 2015, 12:30 a.m.)
> 
> 
> Review request for mesos, Artem Harutyunyan, Michael Hopcroft, Joris Van Remoortere, and Joseph Wu.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> 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.
> 
> Thus, we pass the `-r` flag in explicitly to `xargs`, which causes us to ignore
> whitespace-only calls to `xargs`. This will remove the whole-repository linting
> problem altogether.
> 
> 
> Diffs
> -----
> 
>   support/hooks/post-rewrite 7df1e0f29c6ce940a364c0b1d312251c6160e5e3 
>   support/hooks/pre-commit ca9e9810aca921734be5224e3ef71fe7ff4aa03d 
> 
> Diff: https://reviews.apache.org/r/40195/diff/
> 
> 
> Testing
> -------
> 
> Branches tested manually.
> 
> 
> Thanks,
> 
> Alex Clemmer
> 
>


Re: Review Request 40195: Changed commit hook linting to ignore empty diffs.

Posted by Joris Van Remoortere <jo...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40195/#review109624
-----------------------------------------------------------

Ship it!


After updating the description to match the code.

- Joris Van Remoortere


On Dec. 9, 2015, 11:01 p.m., Alex Clemmer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40195/
> -----------------------------------------------------------
> 
> (Updated Dec. 9, 2015, 11:01 p.m.)
> 
> 
> Review request for mesos, Artem Harutyunyan, Michael Hopcroft, Joris Van Remoortere, and Joseph Wu.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> 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 `mesos-style.py` if not.
> 
> 
> Diffs
> -----
> 
>   support/hooks/post-rewrite 7df1e0f29c6ce940a364c0b1d312251c6160e5e3 
>   support/hooks/pre-commit ca9e9810aca921734be5224e3ef71fe7ff4aa03d 
> 
> Diff: https://reviews.apache.org/r/40195/diff/
> 
> 
> Testing
> -------
> 
> Branches tested manually.
> 
> 
> Thanks,
> 
> Alex Clemmer
> 
>


Re: Review Request 40195: Changed commit hook linting to ignore empty diffs.

Posted by Alex Clemmer <cl...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40195/
-----------------------------------------------------------

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


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


Bugs: MESOS-3134
    https://issues.apache.org/jira/browse/MESOS-3134


Repository: mesos


Description
-------

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 `mesos-style.py` if not.


Diffs
-----

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

Diff: https://reviews.apache.org/r/40195/diff/


Testing
-------

Branches tested manually.


Thanks,

Alex Clemmer


Re: Review Request 40195: Changed commit hook linting to ignore empty diffs.

Posted by Alex Clemmer <cl...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40195/
-----------------------------------------------------------

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


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


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 `mesos-style.py` if not.


Diffs
-----

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

Diff: https://reviews.apache.org/r/40195/diff/


Testing
-------

Branches tested manually.


Thanks,

Alex Clemmer