Skip to content

dotnet-format breaks partial commits #29768

@SteveSandersonMS

Description

@SteveSandersonMS

I've been noticing some weirdness today. When I try to commit a subset of the files I've modified, or a subset of the lines within those files, sometimes my other modifications get committed too. This is causing some havoc with my coding workflow, making me think I was making all kinds of weird mistakes... :)

Looking at .githooks\pre-commit, it doesn't appear to account for partial commits - it just fully adds all the files it touches. Am I missing something here that's supposed to make this work?

I'm disabling it locally for now.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-infrastructureIncludes: MSBuild projects/targets, build scripts, CI, Installers and shared framework

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions