Skip to content

autoupdate downgrades a SHA to an older tag #2811

@vorburger

Description

@vorburger

search you tried in the issue tracker

Yes, and found e.g. #2508 and #103

describe your issue

When I run pre-commit autoupdate on this .pre-commit-config.yaml it changes that SHA to rev: v2.7.0.

This is an OLDER release which does not include a recent change made in that repo which I would like - so it downgrades.

https://github.com/macisamuele/language-formatters-pre-commit-hooks has only 1 default branch.

pre-commit --version

pre-commit 3.1.1

.pre-commit-config.yaml

repos:
  - repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
    rev: 54f7f7c5cb9501110b928f2a98faa8024142f8d7
    hooks:
      - id: pretty-format-java
        args: [--autofix, --aosp]

~/.cache/pre-commit/pre-commit.log (if present)

It's not present.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions