Skip to content

buf breaking in pre-commit will set core.bare to 'true' and failed #3752

@Wu-Jiayang

Description

@Wu-Jiayang

GitHub repository with your minimal reproducible example (do not leave this field blank or fill out this field with "github.com/bufbuild/buf" or we will automatically close your issue, see the instructions above!)

No response

What's up?

When I run pre-commit run --all-files or buf breaking --against "ssh://git@github.com/provistaai/protobuf.git#branch=main", It's all right. But when I run git commit, It will auto set core.bare to 'true' and failed.

Image

It's a submodule and my .pre-commit-config.yaml is:

repos:
  - repo: local
    hooks:
      - id: buf-format
        name: Format Protobuf Files
        entry: buf format -w
        language: system
        files: \.proto$
        pass_filenames: false

      - id: buf-breaking
        name: Check Protobuf Breaking Changes
        entry: buf breaking --against "ssh://git@github.com/provistaai/protobuf.git#branch=main"
        language: system
        files: \.proto$
        pass_filenames: false

Is that a bug? What should I do? Thx a lot

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions