filter-repo: add a --version option
Note that this isn't a version *number* or even the more generalized version string that folks are used to seeing, but a version hash (or leading portion thereof). A few import points: * These version hashes are not strictly monotonically increasing values. Like I said, these aren't version numbers. If that bothers you, read on... * This scheme has incredibly nice semantics satisfying a pair of properties that most version schemes would assume are mutually incompatible: This scheme works even if the user doesn't have a clone of filter-repo and doesn't require any build step to inject the version into the program; it works even if people just download git-filter-repo.py off GitHub without any of the other sources. And: This scheme means that a user is running precisely version X of the code, with the version not easily faked or misrepresented when third parties edit the code. Given the wonderful semantics provided by satisfying this pair of properties that all other versioning schemes seem to miss out on, I think I should name this scheme. How about "Semantic Versioning"? (Hehe...) * The version hash is super easy to use; I just go to my own clone of filter-repo and run either: git show $VERSION_HASH or git describe $VERSION_HASH * A human consumable version might suggest to folks that this software is something they might frequently use and upgrade. This program should only be used in exceptional cases (because rewriting history is not for the faint of heart). * A human consumable version (i.e. a version number or even the more relaxed version strings in more common use) might suggest to folks that they can rely on strict backward compatibility. It's nice to subtly undercut any such assumption. * Despite all that, I will make releases (downloadable tarballs with real version numbers in the tarball name; I'm just going to re-use whatever version git is released with at the time). But those version numbers won't be used by the --version option; instead the version hash will. Signed-off-by: Elijah Newren <newren@gmail.com>pull/13/head
parent
1e21d6e2ec
commit
e6dd613e3f
Loading…
Reference in New Issue