{"thread":{"id":"2563","subject":"[PATCH 1/2] Build GIT_VERSION from VERSION, PATCHLEVEL, and SUBLEVEL variables.","startedAt":"2005-11-17T13:25:37Z","lastAt":"2005-11-18T00:49:49Z","messageCount":16,"participants":["Martin Atukunda","Johannes Schindelin","Josef Weidendorfer","Andreas Ericsson","Junio C Hamano","Linus Torvalds"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"12100","messageId":"11322339373013-git-send-email-matlads@dsmagic.com","threadId":"2563","inReplyTo":"11322339372137-git-send-email-matlads@dsmagic.com","subject":"[PATCH 1/2] Build GIT_VERSION from VERSION, PATCHLEVEL, and SUBLEVEL variables.","fromName":"Martin Atukunda","fromEmail":"matlads@dsmagic.com","sentAt":"2005-11-17T13:25:37Z","receivedAt":"2005-11-17T13:25:37Z","isPatch":true,"sender":{"key":"matlads@dsmagic.com","avatar":null},"body":"This will allow scripts to be able to determine which git release they\ntarget (or require).\n\nSigned-Off-By: Martin Atukunda <matlads@dsmagic.com>\n\n---\n\n Makefile |    6 +++++-\n 1 files changed, 5 insertions(+), 1 deletions(-)\n\napplies-to: 1e3fcf60526c196a46433e6947c9104ca236f230\n968e5b59fba66a1b146c643e5161978c787d4273\ndiff --git a/Makefile b/Makefile\nindex ebff990..74c6b9e 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -50,7 +50,11 @@\n # Define USE_STDEV below if you want git to care about the underlying device\n # change being considered an inode change from the update-cache perspective.\n \n-GIT_VERSION = 0.99.9.GIT\n+VERSION = 0\n+PATCHLEVEL = 99\n+SUBLEVEL = 9\n+EXTRAVERSION = GIT\n+GIT_VERSION=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL).$(EXTRAVERSION)\n \n # CFLAGS and LDFLAGS are for the users to override from the command line.\n \n---\n0.99.9.GIT\n"},{"id":"12101","messageId":"11322339372137-git-send-email-matlads@dsmagic.com","threadId":"2563","inReplyTo":null,"subject":"[PATCH] Add .git/version","fromName":"Martin Atukunda","fromEmail":"matlads@dsmagic.com","sentAt":"2005-11-17T13:25:37Z","receivedAt":"2005-11-17T13:25:37Z","isPatch":true,"sender":{"key":"matlads@dsmagic.com","avatar":null},"body":"\nThis patch series attempts to add .git/version support to init-db.c. THis\nis an overview of the patches.\n\nFirst patch makes the Makefile build GIT_VERSION from the variables VERSION,\nPATCHLEVEL, and SUBLEVEL ala the kernel. These variables will be used later\nin init-db.c\n\nSecond patch adds support to init-db.c for writing the .git/version file.\n\n- Martin -\n"},{"id":"12102","messageId":"11322339372336-git-send-email-matlads@dsmagic.com","threadId":"2563","inReplyTo":"11322339373013-git-send-email-matlads@dsmagic.com","subject":"[PATCH 2/2] Make init-db record the version in $GIT_DIR/version when creating repo.","fromName":"Martin Atukunda","fromEmail":"matlads@dsmagic.com","sentAt":"2005-11-17T13:25:37Z","receivedAt":"2005-11-17T13:25:37Z","isPatch":true,"sender":{"key":"matlads@dsmagic.com","avatar":null},"body":"Signed-Off-By: Martin Atukunda <matlads@dsmagic.com>\n\n---\n\n Makefile  |    3 +++\n init-db.c |   15 +++++++++++++++\n 2 files changed, 18 insertions(+), 0 deletions(-)\n\napplies-to: ec55de586902d26b3f55c3d0aeabf94be1b82586\nec733719bfee2ade91416bd429eeefe6c4acb5a8\ndiff --git a/Makefile b/Makefile\nindex 74c6b9e..c167120 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -400,6 +400,9 @@ git-rev-list$X: LIBS += $(OPENSSL_LIBSSL\n \n init-db.o: init-db.c\n \t$(CC) -c $(ALL_CFLAGS) \\\n+\t\t-DVERSION='\"$(VERSION)\"' \\\n+\t\t-DPATCHLEVEL='\"$(PATCHLEVEL)\"' \\\n+\t\t-DSUBLEVEL='\"$(SUBLEVEL)\"' \\\n \t\t-DDEFAULT_GIT_TEMPLATE_DIR=$(call shellquote,\"$(template_dir)\") $*.c\n \n $(LIB_OBJS): $(LIB_H)\ndiff --git a/init-db.c b/init-db.c\nindex bd88291..6230e8e 100644\n--- a/init-db.c\n+++ b/init-db.c\n@@ -19,6 +19,17 @@ static void safe_create_dir(const char *\n \t}\n }\n \n+static void record_repo_version(const char *path)\n+{\n+\tFILE *verfile = fopen(path, \"w\");\n+\tif (!verfile)\n+\t\tdie (\"Can not write to %s?\", path);\n+\t\n+\tfprintf(verfile, \"%d.%d.%d\\n\", VERSION, PATCHLEVEL, SUBLEVEL);\n+\t\n+\tfclose(verfile);\n+}\n+\n static int copy_file(const char *dst, const char *src, int mode)\n {\n \tint fdi, fdo, status;\n@@ -212,6 +223,10 @@ static void create_default_files(const c\n \t\t\t\tfprintf(stderr, \"Ignoring file modes\\n\");\n \t\t}\n \t}\n+\n+\t/* record the version of the git repo */\n+\tstrcpy(path + len, \"version\");\n+\trecord_repo_version(path);\n }\n \n static const char init_db_usage[] =\n---\n0.99.9.GIT\n"},{"id":"12103","messageId":"Pine.LNX.4.63.0511171436170.13358@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"2563","inReplyTo":"11322339372137-git-send-email-matlads@dsmagic.com","subject":"Re: [PATCH] Add .git/version","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2005-11-17T13:39:21Z","receivedAt":"2005-11-17T13:39:21Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Thu, 17 Nov 2005, Martin Atukunda wrote:\n\n> This patch series attempts to add .git/version support to init-db.c.\n\nWouldn't it make more sense to add the variable VERSION to git-var? After \nall, git is designed to be backwards compatible; newer versions are \nsupposed to work with ancient repositories.\n\nI think you are more interested in knowing which version the tools are at.\n\nCiao,\nDscho\n"},{"id":"12107","messageId":"20051117151653.GB3626@igloo.ds.co.ug","threadId":"2563","inReplyTo":"Pine.LNX.4.63.0511171436170.13358@wbgn013.biozentrum.uni-wuerzburg.de","subject":"Re: [PATCH] Add .git/version","fromName":"Martin Atukunda","fromEmail":"matlads@dsmagic.com","sentAt":"2005-11-17T15:16:53Z","receivedAt":"2005-11-17T15:16:53Z","isPatch":true,"sender":{"key":"matlads@dsmagic.com","avatar":null},"body":"On Thu, Nov 17, 2005 at 02:39:21PM +0100, Johannes Schindelin wrote:\n> Hi,\n> \n> On Thu, 17 Nov 2005, Martin Atukunda wrote:\n> \n> > This patch series attempts to add .git/version support to init-db.c.\n> \n> Wouldn't it make more sense to add the variable VERSION to git-var? After \n> all, git is designed to be backwards compatible; newer versions are \n> supposed to work with ancient repositories.\n> \n> I think you are more interested in knowing which version the tools are at.\n\nActually this patch series is more a response to the thread\n\"Re: [PATCH] Disable USE_SYMLINK_HEAD by default\" in  particular see\nthis message 200511160205.43443.Josef.Weidendorfer@gmx.de by Josef\nWeidendorfer.\n\nWe've had at least one change that was backwards incompatible, though\nthis was in the ancient days of git development. This patch allows git to record what\nversion of the git tools created the repo we are dealing with. Just in\ncase future changes require this.\n\n- Martin -\n\n-- \nDue to a shortage of devoted followers, the production of great leaders has been discontinued.\n"},{"id":"12109","messageId":"Pine.LNX.4.63.0511171634460.17319@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"2563","inReplyTo":"20051117151653.GB3626@igloo.ds.co.ug","subject":"Re: [PATCH] Add .git/version","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2005-11-17T15:38:17Z","receivedAt":"2005-11-17T15:38:17Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Thu, 17 Nov 2005, Martin Atukunda wrote:\n\n> On Thu, Nov 17, 2005 at 02:39:21PM +0100, Johannes Schindelin wrote:\n> > \n> > I think you are more interested in knowing which version the tools are at.\n> \n> Actually this patch series is more a response to the thread\n> \"Re: [PATCH] Disable USE_SYMLINK_HEAD by default\" in  particular see\n> this message 200511160205.43443.Josef.Weidendorfer@gmx.de by Josef\n> Weidendorfer.\n\nWhen we disable USE_SYMLINK_HEAD by default, tools are expected to work \nwith USE_SYMLINK_HEAD enabled, too, so .git/version is not needed for \nthat.\n\nBut yes, it might be handy to know at some time. But I think it would make \nsense to add .git/version *then*, because you can distinguish repositories \nbefore/after the change by testing for .git/version.\n\nCiao,\nDscho\n"},{"id":"12111","messageId":"200511171644.48438.Josef.Weidendorfer@gmx.de","threadId":"2563","inReplyTo":"11322339372137-git-send-email-matlads@dsmagic.com","subject":"Re: [PATCH] Add .git/version","fromName":"Josef Weidendorfer","fromEmail":"josef.weidendorfer@gmx.de","sentAt":"2005-11-17T15:44:47Z","receivedAt":"2005-11-17T15:44:47Z","isPatch":true,"sender":{"key":"josef.weidendorfer@gmx.de","avatar":null},"body":"On Thursday 17 November 2005 14:25, Martin Atukunda wrote:\n> This patch series attempts to add .git/version support to init-db.c. THis\n> is an overview of the patches.\n\nAs .git/version is part of the repository, it should contain the version\nof the repository format used. Do you really want to link the version\nof the repository format with the version of git which created the\nrepository? It think it is better to detach a repository version from\nversion of git.\n\nWhy? Ideally, the git commands first should check if they can handle the\nrepository format. If they can not handle the version, they should bail\nout with an error [*]\nNow suppose we want to release Git 2 without change the repository\nformat at all. Thus, even if Git 1 tool *would* work with repositories\ncreated by Git 2, they will fail in the version check!\n\nIf this is meant to be used in scripts (as your commit comment mentions):\na script should never touch any files in the repository directly, but go\nvia commands supplied with git. So these scripts should actually check\nagainst the version of installed git. Thus, such a version string should go\ninto git-var or better simply use the existing \"git --version\"?\n\nJosef\n\n[*] Junio: This should be done before Git 1.0 - it is needed to be able\nto change the repository format in the future without taking the risk\nthat old git commands possibly corrupt a repo in the new format. This\nhas nothing to do with backwards compatibility. Without a version, we\nare forced to be forwards compatible ;-)\nNeeded in init-db.c is a \"echo 1 >.git/version\"; and the mentioned check\nin the tools against this version.\n"},{"id":"12116","messageId":"200511171704.15503.Josef.Weidendorfer@gmx.de","threadId":"2563","inReplyTo":"Pine.LNX.4.63.0511171634460.17319@wbgn013.biozentrum.uni-wuerzburg.de","subject":"Re: [PATCH] Add .git/version","fromName":"Josef Weidendorfer","fromEmail":"josef.weidendorfer@gmx.de","sentAt":"2005-11-17T16:04:15Z","receivedAt":"2005-11-17T16:04:15Z","isPatch":true,"sender":{"key":"josef.weidendorfer@gmx.de","avatar":null},"body":"On Thursday 17 November 2005 16:38, Johannes Schindelin wrote:\n> But yes, it might be handy to know at some time. But I think it would make \n> sense to add .git/version *then*, because you can distinguish repositories \n> before/after the change by testing for .git/version.\n\nNo, as old git tools then still could corrupt a repository with a new format,\nas they currently do not check any kind of format version; it would work if\nthe git 1 tools would bail out if a .git/version is found ;-)\n\nJosef\n"},{"id":"12121","messageId":"437CB0CA.6070306@op5.se","threadId":"2563","inReplyTo":"200511171644.48438.Josef.Weidendorfer@gmx.de","subject":"Re: [PATCH] Add .git/version","fromName":"Andreas Ericsson","fromEmail":"ae@op5.se","sentAt":"2005-11-17T16:33:14Z","receivedAt":"2005-11-17T16:33:14Z","isPatch":true,"sender":{"key":"ae@op5.se","avatar":"https://gravatar.com/avatar/426e89595c75a8f5252dd0c989e5fabe5bcac616e68557427ad9aef6b0ca342a?d=mp&s=160"},"body":"Josef Weidendorfer wrote:\n> On Thursday 17 November 2005 14:25, Martin Atukunda wrote:\n> \n> As .git/version is part of the repository, it should contain the version\n> of the repository format used. Do you really want to link the version\n> of the repository format with the version of git which created the\n> repository? It think it is better to detach a repository version from\n> version of git.\n> \n> Why? Ideally, the git commands first should check if they can handle the\n> repository format. If they can not handle the version, they should bail\n> out with an error [*]\n> Now suppose we want to release Git 2 without change the repository\n> format at all. Thus, even if Git 1 tool *would* work with repositories\n> created by Git 2, they will fail in the version check!\n> \n\nNot that I have an opinion on these changes, but Netscape 7 still \nhandles HTTP 1.1. Just because we up the major-number for git doesn't \nmean we have to do the same for the repository format version.\n\n-- \nAndreas Ericsson                   andreas.ericsson@op5.se\nOP5 AB                             www.op5.se\nTel: +46 8-230225                  Fax: +46 8-230231\n"},{"id":"12122","messageId":"200511171741.23147.Josef.Weidendorfer@gmx.de","threadId":"2563","inReplyTo":"437CB0CA.6070306@op5.se","subject":"Re: [PATCH] Add .git/version","fromName":"Josef Weidendorfer","fromEmail":"josef.weidendorfer@gmx.de","sentAt":"2005-11-17T16:41:23Z","receivedAt":"2005-11-17T16:41:23Z","isPatch":true,"sender":{"key":"josef.weidendorfer@gmx.de","avatar":null},"body":"On Thursday 17 November 2005 17:33, Andreas Ericsson wrote:\n> > Why? Ideally, the git commands first should check if they can handle the\n> > repository format. If they can not handle the version, they should bail\n> > out with an error [*]\n> > Now suppose we want to release Git 2 without change the repository\n> > format at all. Thus, even if Git 1 tool *would* work with repositories\n> > created by Git 2, they will fail in the version check!\n> > \n> \n> Not that I have an opinion on these changes, but Netscape 7 still \n> handles HTTP 1.1. Just because we up the major-number for git doesn't \n> mean we have to do the same for the repository format version.\n\nOf course we do not want that.\nMy comment was about this, as the proposed patch installed a\n.git/version file with the git version in it, which would lead to\nthis strange result.\n\nJosef\n"},{"id":"12127","messageId":"20051117190848.GA5745@igloo.ds.co.ug","threadId":"2563","inReplyTo":"200511171741.23147.Josef.Weidendorfer@gmx.de","subject":"Re: [PATCH] Add .git/version","fromName":"Martin Atukunda","fromEmail":"matlads@dsmagic.com","sentAt":"2005-11-17T19:08:48Z","receivedAt":"2005-11-17T19:08:48Z","isPatch":true,"sender":{"key":"matlads@dsmagic.com","avatar":null},"body":"On Thu, Nov 17, 2005 at 05:41:23PM +0100, Josef Weidendorfer wrote:\n> On Thursday 17 November 2005 17:33, Andreas Ericsson wrote:\n> > > Why? Ideally, the git commands first should check if they can handle the\n> > > repository format. If they can not handle the version, they should bail\n> > > out with an error [*]\n> > > Now suppose we want to release Git 2 without change the repository\n> > > format at all. Thus, even if Git 1 tool *would* work with repositories\n> > > created by Git 2, they will fail in the version check!\n> > > \n> > \n> > Not that I have an opinion on these changes, but Netscape 7 still \n> > handles HTTP 1.1. Just because we up the major-number for git doesn't \n> > mean we have to do the same for the repository format version.\n> \n> Of course we do not want that.\n> My comment was about this, as the proposed patch installed a\n> .git/version file with the git version in it, which would lead to\n> this strange result.\n> \nI agree, I'll resubmit a patch to create a .git/version file that simply\nsays 1.\n\nwhich specific git commands would most likely want to know about the\nversion of the repo format? I could look at them to see what needs to be\nchanged so that they don't corrupt a repo, or as Johannes said, the use\nof this file would become handy only when an incompatible change is\nmade. In which case, init-db.c just creates it for now, as a simple safe\nguard.\n\n- Martin -\n\n-- \nDue to a shortage of devoted followers, the production of great leaders has been discontinued.\n"},{"id":"12128","messageId":"20051117191821.GC5745@igloo.ds.co.ug","threadId":"2563","inReplyTo":"20051117190848.GA5745@igloo.ds.co.ug","subject":"[PATCH] Add .git/version (Take 2)","fromName":"Martin Atukunda","fromEmail":"matlads@dsmagic.com","sentAt":"2005-11-17T19:18:21Z","receivedAt":"2005-11-17T19:18:21Z","isPatch":true,"sender":{"key":"matlads@dsmagic.com","avatar":null},"body":"\nCurrently the version number can be considered version 1, so this patch\njust sets it to that. This patch supercedes my earlier attempt that\nerroneously used the git version number as the repo format version.\n\nSigned-Off-By: Martin Atukunda <matlads@dsmagic.com>\n\n---\n\n init-db.c |   17 +++++++++++++++++\n 1 files changed, 17 insertions(+), 0 deletions(-)\n\napplies-to: d1bb16b919a119cca6ee001f755f83251a2c2964\n31e78e387d708da5e09f40436d5fdc9e9ec5e16c\ndiff --git a/init-db.c b/init-db.c\nindex bd88291..e403dac 100644\n--- a/init-db.c\n+++ b/init-db.c\n@@ -9,6 +9,8 @@\n #define DEFAULT_GIT_TEMPLATE_DIR \"/usr/share/git-core/templates/\"\n #endif\n \n+#define REPO_VERSION 1\n+\n static void safe_create_dir(const char *dir)\n {\n \tif (mkdir(dir, 0777) < 0) {\n@@ -19,6 +21,17 @@ static void safe_create_dir(const char *\n \t}\n }\n \n+static void record_repo_version(const char *path)\n+{\n+\tFILE *verfile = fopen(path, \"w\");\n+\tif (!verfile)\n+\t\tdie (\"Can not write to %s?\", path);\n+\t\n+\tfprintf(verfile, \"%d\\n\", REPO_VERSION);\n+\t\n+\tfclose(verfile);\n+}\n+\n static int copy_file(const char *dst, const char *src, int mode)\n {\n \tint fdi, fdo, status;\n@@ -212,6 +225,10 @@ static void create_default_files(const c\n \t\t\t\tfprintf(stderr, \"Ignoring file modes\\n\");\n \t\t}\n \t}\n+\n+\t/* record the version of the git repo */\n+\tstrcpy(path + len, \"version\");\n+\trecord_repo_version(path);\n }\n \n static const char init_db_usage[] =\n---\n0.99.9.GIT\n\n-- \nDue to a shortage of devoted followers, the production of great leaders has been discontinued.\n"},{"id":"12129","messageId":"7v7jb7uler.fsf@assigned-by-dhcp.cox.net","threadId":"2563","inReplyTo":"200511171644.48438.Josef.Weidendorfer@gmx.de","subject":"Re: [PATCH] Add .git/version","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-11-17T19:25:16Z","receivedAt":"2005-11-17T19:25:16Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Josef Weidendorfer <Josef.Weidendorfer@gmx.de> writes:\n\n> [*] Junio: This should be done before Git 1.0 - it is needed to be able\n> to change the repository format in the future without taking the risk\n> that old git commands possibly corrupt a repo in the new format. This\n> has nothing to do with backwards compatibility. Without a version, we\n> are forced to be forwards compatible ;-)\n> Needed in init-db.c is a \"echo 1 >.git/version\"; and the mentioned check\n> in the tools against this version.\n\nI agree with the general direction.\n\n - Futureproofing is good.\n\n - We want repository-format-version but that may be too\n   long. Just saying version is a bit confusing.  Abbreviating\n   it to repository-version makes it sound as if somebody took a\n   snapshot (i.e. tar-tree $commit).  Whatever name we choose,\n   let's pick a one not so confusing.\n\n - Not having .git/version (or whatever name) signals the tools\n   our repository is in the original format.  This will keep the\n   existing repositories happy.  What this means is that the\n   tools need to check for the absense of .git/version in this\n   round.  When we change the repository format, we will have\n   .git/version file that records it.\n\n - You can run git-init-db on an existing repository.  This is\n   sometimes handy if you added a new hook in the template suite\n   and want to copy it over (it never overwrites but happily\n   copies what you do not have).  This mechanism needs to be\n   told about the version file -- specifically, it should check\n   version in the template area and refuse to do use that\n   template if it does not match the repository.  Similarly,\n   when creating a repository from scratch, it should not copy\n   the version file from templates.\n"},{"id":"12138","messageId":"Pine.LNX.4.64.0511171131260.13959@g5.osdl.org","threadId":"2563","inReplyTo":"7v7jb7uler.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Add .git/version","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2005-11-17T19:35:11Z","receivedAt":"2005-11-17T19:35:11Z","isPatch":true,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Thu, 17 Nov 2005, Junio C Hamano wrote:\n> \n>  - We want repository-format-version but that may be too\n>    long. Just saying version is a bit confusing.  Abbreviating\n>    it to repository-version makes it sound as if somebody took a\n>    snapshot (i.e. tar-tree $commit).  Whatever name we choose,\n>    let's pick a one not so confusing.\n\nMy one argument against this is that I don't see why we have to have a \nseparate file for this.\n\nWhy not just add a \"core.version\" flag to the config file? If no version \nexists, assume it's version 1. And then, if we ever start using some other \nversion, make git-init-db always create the config file (the way we \nalready do for \"core.filemode\")\n\nSure, people can edit the version flag by hand, but hey, that's true even \nif it's in a separate .git/version file.\n\n\t\tLinus\n"},{"id":"12168","messageId":"Pine.LNX.4.63.0511180039270.18775@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"2563","inReplyTo":"Pine.LNX.4.64.0511171131260.13959@g5.osdl.org","subject":"Re: [PATCH] Add .git/version","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2005-11-17T23:41:21Z","receivedAt":"2005-11-17T23:41:21Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Thu, 17 Nov 2005, Linus Torvalds wrote:\n\n> On Thu, 17 Nov 2005, Junio C Hamano wrote:\n> > \n> >  - We want repository-format-version but that may be too\n> >    long. Just saying version is a bit confusing.  Abbreviating\n> >    it to repository-version makes it sound as if somebody took a\n> >    snapshot (i.e. tar-tree $commit).  Whatever name we choose,\n> >    let's pick a one not so confusing.\n> \n> My one argument against this is that I don't see why we have to have a \n> separate file for this.\n> \n> Why not just add a \"core.version\" flag to the config file? If no version \n> exists, assume it's version 1. And then, if we ever start using some other \n> version, make git-init-db always create the config file (the way we \n> already do for \"core.filemode\")\n\nNote that git-sh-setup and setup_git_directory() should check for it and \ncomplain if it finds a value > 1. Else there is not much which prevents \nold tools (like current) to access future versions.\n\nThe actual number may come later. The check can't.\n\nCiao,\nDscho\n"},{"id":"12170","messageId":"7vu0eard8y.fsf@assigned-by-dhcp.cox.net","threadId":"2563","inReplyTo":"Pine.LNX.4.64.0511171131260.13959@g5.osdl.org","subject":"Re: [PATCH] Add .git/version","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-11-18T00:49:49Z","receivedAt":"2005-11-18T00:49:49Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Linus Torvalds <torvalds@osdl.org> writes:\n\n> My one argument against this is that I don't see why we have to have a \n> separate file for this.\n\nTrue.\n\n> Why not just add a \"core.version\" flag to the config file?\n\nTrue, perhaps core.repository-format-version?\n"}]}