reuse-tool icon indicating copy to clipboard operation
reuse-tool copied to clipboard

Don't recommend using latest rev of reuse-tool in .pre-commit-config.yaml

Open ryandesign opened this issue 3 years ago • 5 comments

I'm adopting REUSE in my project. The docs say:

This uses pre-commit. Once you have it installed, add this to the .pre-commit-config.yaml in your repository:

repos:
  - repo: https://github.com/fsfe/reuse-tool
    rev: latest
    hooks:
      - id: reuse

Then run pre-commit install.

I created .pre-commit-config.yaml with that content and ran pre-commit install (using pre-commit 2.20.0) and it warned that it does not support setting rev to latest:

[WARNING] The 'rev' field of repo 'https://github.com/fsfe/reuse-tool' appears to be a mutable reference (moving tag / branch).  Mutable references are never updated after first install and are not supported.  See https://pre-commit.com/#using-the-latest-version-for-a-repository for more details.  Hint: `pre-commit autoupdate` often fixes this.
pre-commit installed at .git/hooks/pre-commit

After running pre-commit autoupdate (as suggested in the warning) it changed rev to v1.0.0.

So it appears that one should set rev: v1.0.0 (or whatever the current version of reuse-tool is at the time) and update it (potentially using pre-commit autoupdate) when new versions are released.

ryandesign avatar Oct 04 '22 23:10 ryandesign

Agreed. This should be an easy fix. It's on the horizon.

carmenbianca avatar Oct 11 '22 08:10 carmenbianca

It hasn't been fixed. Please reopen.

ryandesign avatar Jan 14 '23 06:01 ryandesign

For some reason the docs aren't up-to-date.

carmenbianca avatar Jan 16 '23 09:01 carmenbianca

How do we update the docs?

ryandesign avatar Mar 25 '23 23:03 ryandesign

I think this issue is already fixed (documentation is updated) @carmenbianca

Pablohn26 avatar Apr 20 '24 03:04 Pablohn26