Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[clang-format] Fix a serious bug in git-clang-format #65723

Merged
merged 1 commit into from
Sep 8, 2023

Conversation

owenca
Copy link
Contributor

@owenca owenca commented Sep 8, 2023

When applying format changes to staged files, git-clang-format erroneously checks out all files in the index and thus may overwrite unstaged changes.

Fixes #65643.

@owenca owenca requested a review from a team as a code owner September 8, 2023 08:29
Copy link
Contributor

@cor3ntin cor3ntin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh wow. Thanks for fixing that so quickly!

When applying format changes to staged files, git-clang-format erroneously
checks out all files in the index and thus may overwrite unstaged changes.

Fixes llvm#65643.
@owenca owenca merged commit 743659b into llvm:main Sep 8, 2023
1 of 2 checks passed
@owenca owenca deleted the git-clang-format branch September 8, 2023 22:05
tru pushed a commit that referenced this pull request Oct 17, 2023
When applying format changes to staged files, git-clang-format
erroneously checks out all files in the index and thus may overwrite
unstaged changes.

Fixes #65643.

(cherry picked from commit 743659b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

git-clang-format removes unstaged files
3 participants