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

Re: [PATCH] config: mmap() the contents of the config file

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
May 7, 2006, 11:40 UTC
Message-ID
<Pine.LNX.4.63.0605071339320.2528@wbgn013.biozentrum.uni-wuerzburg.de>
In-Reply-To
<Pine.LNX.4.63.0605070103270.26358@wbgn013.biozentrum.uni-wuerzburg.de>
Hi,
On Sun, 7 May 2006, Johannes Schindelin wrote:
> This makes it possible to rewrite the config without accessing the config
> file twice.
Since commit c2b9e699, this is needed, too:
diff --git a/config.c b/config.c
index 59006fa..30effe3 100644
--- a/config.c
+++ b/config.c
@@ -362,7 +362,7 @@ static int store_aux(const char* key, co
 		} else if (strrchr(key, '.') - key == store.baselen &&
 			      !strncmp(key, store.key, store.baselen)) {
 					store.state = SECTION_SEEN;
-					store.offset[store.seen] = ftell(config_file);
+					store.offset[store.seen] = config_offset;
 		}
 	}
 	return 0;
-- 
1.3.2.g4e38b-dirty
Previous: Johannes Schindelin
Message 2 of 2 in “config: mmap() the contents of the config file”
  1. config: mmap() the contents of the config fileJohannes Schindelin, May 6, 2006
  2. Johannes SchindelinMay 7, 2006

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.