Re: [PATCH] Add .git/version
From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:42:12
Hi, On Thu, 17 Nov 2005, Linus Torvalds wrote:
On Thu, 17 Nov 2005, Junio C Hamano wrote:quoted
- We want repository-format-version but that may be too long. Just saying version is a bit confusing. Abbreviating it to repository-version makes it sound as if somebody took a snapshot (i.e. tar-tree $commit). Whatever name we choose, let's pick a one not so confusing.My one argument against this is that I don't see why we have to have a separate file for this. Why not just add a "core.version" flag to the config file? If no version exists, assume it's version 1. And then, if we ever start using some other version, make git-init-db always create the config file (the way we already do for "core.filemode")
Note that git-sh-setup and setup_git_directory() should check for it and complain if it finds a value > 1. Else there is not much which prevents old tools (like current) to access future versions. The actual number may come later. The check can't. Ciao, Dscho