git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 2/4] Check repository format version in enter_repo().

From
Junio C Hamano <junkio@cox.net>
Date
Nov 26, 2005, 01:15 UTC
Message-ID
<7vd5kogqg0.fsf@assigned-by-dhcp.cox.net>

After daemon, upload-pack and receive-pack find out where the git directory is and chdir() there, make sure that repository is in a format we understand, after putenv("GIT_DIR=.") so that it knows to pick up the configuration file from there.

Signed-off-by: Junio C Hamano <junkio@cox.net>
---
 path.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

applies-to: 936ce54dedc7c7cfcf8f83a742325b3329eb95a1 ed2f604235d7f400ee5fa01a591158cdabd65197

diff --git a/path.c b/path.c
index 4d88947..2c077c0 100644
--- a/path.c
+++ b/path.c
@@ -199,6 +199,7 @@ char *enter_repo(char *path, int strict)
 	if(access("objects", X_OK) == 0 && access("refs", X_OK) == 0 &&
 	   validate_symref("HEAD") == 0) {
 		putenv("GIT_DIR=.");
+		check_repository_format();
 		return current_dir();
 	}
 
---
0.99.9.GIT
Message 1 of 1 in “Check repository format version in enter_repo().”
  1. 2/4 Check repository format version in enter_repo().Junio C Hamano, Nov 26, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.