Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Tor Tor
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 319
    • Issues 319
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 37
    • Merge requests 37
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • The Tor Project
  • Core
  • TorTor
  • Issues
  • #33409
Closed
Open
Created Feb 21, 2020 by rl1987@rl1987

Pre-commit hook does not stash unstaged changes before running code style checkers

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.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking