# [RFC/PATCH 2/3] Add GIT_REPO_VERSION, and repository_format_version

1 messages from 2005-11-24 to 2005-11-24. Participants: Junio C Hamano.
Thread: https://gitlist.dev/t/2666

## Junio C Hamano, 2005-11-24 03:36

Subject: [RFC/PATCH 2/3] Add GIT_REPO_VERSION, and repository_format_version
Message-ID: <7vhda2zph5.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7vhda2zph5.fsf%40assigned-by-dhcp.cox.net

```
From: Martin Atukunda <matlads@dsmagic.com>
Date: 1132619292 +0300

This variable will enable git to track the repository version. It's
currently set to 0. (in true C style :)

Signed-off-by: Martin Atukunda <matlads@dsmagic.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>

---
 * This is verbatim as I received from Martin.

 cache.h       |    4 ++++
 environment.c |    1 +
 2 files changed, 5 insertions(+), 0 deletions(-)

applies-to: 787c201a1691219d30c1a3fd849dc5ee9b35e2ce
abb173e753857d7360ae7ff1869be8d96e353ba7
diff --git a/cache.h b/cache.h
index 3104c59..7cde341 100644
--- a/cache.h
+++ b/cache.h
@@ -183,6 +183,10 @@ extern int trust_executable_bit;
 extern int only_use_symrefs;
 extern int diff_rename_limit_default;
 
+#define GIT_REPO_VERSION 0
+extern int repository_format_version;
+extern int check_repo_format(void);
+
 #define MTIME_CHANGED	0x0001
 #define CTIME_CHANGED	0x0002
 #define OWNER_CHANGED	0x0004
diff --git a/environment.c b/environment.c
index b5026f1..3f19473 100644
--- a/environment.c
+++ b/environment.c
@@ -13,6 +13,7 @@ char git_default_email[MAX_GITNAME];
 char git_default_name[MAX_GITNAME];
 int trust_executable_bit = 1;
 int only_use_symrefs = 0;
+int repository_format_version = 0;
 
 static char *git_dir, *git_object_dir, *git_index_file, *git_refs_dir,
 	*git_graft_file;
---
0.99.9.GIT

```
