Open
Bug 1764663
Opened 3 years ago
Updated 1 year ago
Git pre-commit hook does not respect working tree/index distinction
Categories
(Developer Infrastructure :: Lint and Formatting, defect, P3)
Developer Infrastructure
Lint and Formatting
Tracking
(Not tracked)
NEW
People
(Reporter: rkraesig, Unassigned)
Details
If multiple changes are made to a file, and some but not all of those changes are added to the index (as may be the case after running git add -p
), then the pre-commit hook will destroy this distinction by silently adding all the remaining changes to the new commit as well.
Presumably this is what the TODO around line 90 is about.
(I think the ideal behavior here is to run clang-format-diff.py
on git diff --cached
, and if its output doesn't also apply cleanly to the working tree, just reject the commit. Unconditionally erroring in this state is probably an acceptable fallback, though.)
Comment 1•3 years ago
|
||
The severity field is not set for this bug.
:ahal, could you have a look please?
For more information, please visit auto_nag documentation.
Flags: needinfo?(ahal)
Updated•3 years ago
|
Severity: -- → S3
Flags: needinfo?(ahal)
Priority: -- → P3
Updated•2 years ago
|
Product: Firefox Build System → Developer Infrastructure
You need to log in
before you can comment on or make changes to this bug.
Description
•