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

[PATCH] index-pack: setup git repository

From
Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Date
Aug 26, 2008, 14:32 UTC
Message-ID
<1219761162-5942-1-git-send-email-pclouds@gmail.com>

"git index-pack" is an independent command and does not setup git repository while still need pack.indexversion. It may miss the info if it is in a subdirectory of the repository.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
 index-pack.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/index-pack.c b/index-pack.c
index 52064be..728af7d 100644
--- a/index-pack.c
+++ b/index-pack.c
@@ -876,7 +876,9 @@ int main(int argc, char **argv)
 	char *index_name_buf = NULL, *keep_name_buf = NULL;
 	struct pack_idx_entry **idx_objects;
 	unsigned char sha1[20];
+	int nongit = 0;
 
+	setup_git_directory_gently(&nongit);
 	git_config(git_index_pack_config, NULL);
 
 	for (i = 1; i < argc; i++) {
-- 
1.6.0.96.g2fad1.dirty
Message 1 of 1 in “index-pack: setup git repository”
  1. index-pack: setup git repositoryNguyễn Thái Ngọc Duy, Aug 26, 2008

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.