[tor-bugs] #33409 [Core Tor/Tor]: Pre-commit hook does not stash unstaged changes before running code style checkers
Tor Bug Tracker & Wiki
blackhole at torproject.org
Fri Feb 21 10:20:33 UTC 2020
#33409: Pre-commit hook does not stash unstaged changes before running code style
checkers
------------------------------+--------------------
Reporter: rl1987 | Owner: (none)
Type: defect | Status: new
Priority: Medium | Milestone:
Component: Core Tor/Tor | Version:
Severity: Normal | Keywords:
Actual Points: | Parent ID:
Points: | Reviewer:
Sponsor: |
------------------------------+--------------------
How to reproduce:
1) Make some changes to C files and violate whitespace rules.
2) `git add` affected files and try to `git commit`. Pre-commit hook will
not allow it and will print the whitespace issues it found.
3) Fix whitespace problems, but forget to `git add` the files.
4) Running `git commit` again does not reject the changes, despite
whitespace fixes not being staged. New commit now includes whitespace
violations and none of the fixes that were done in step 3.
This is not limited to whitespace issues, but could affect other code
style checks as well.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/33409>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list