- 
          
- 
        Couldn't load subscription status. 
- Fork 19
Description
In my project we're setting project/VERSION and reading that in as the basis for file-based versioning using
[tool.setuptools-git-versioning]
enabled = true
version_file = "project/VERSION" 
count_commits_from_version_file = true
dev_template = "{tag}.{branch}{ccount}"
branch_formatter = "utils:_branchFormatter" 
(branch formatter is there to sanitize branch name to something valid for a version)
Now, if we do clone with depth=1, we get an invalid versions like 2024.1.0devNone because it couldn't find either a tag distance or a commit distance. It would be great if, when no distance was found it simply returned the contents of the VERSION file (or 2024.1.0dev0. Basically, I want it always to be something valid no matter how they've fetched the project. Is this something that needs a custom version callback?
The project in question has over 900 forks so if it doesn't "just work" in all common cases then contributors are going to hit annoying barriers.
I think my current workaround is going to be to leave setuptools-git-versioning out of the main repo (for safety/compatibility) and just install it in the CI build system, when generating our official releases. But if I could set it up to work safely in all places that would feel neater.