From: Johannes Schindelin Date: Sat, 06 May 2006 23:45:22 GMT Subject: Re: [PATCH] config: if mtime (or size) of the config file changed since last read, reread it Message-ID: In-Reply-To: Hi, sorry: bad patch. This is needed on top. diff --git a/config.c b/config.c index 6765186..452b587 100644 --- a/config.c +++ b/config.c @@ -261,6 +261,10 @@ int git_config_from_file(config_fn_t fn, config_offset = 0; in_fd = open(filename, O_RDONLY); + if (in_fd < 0 && ENOENT != errno ) + die("opening %s: %s", config_file_name, + strerror(errno)); + fstat(in_fd, &st); if (contents) { @@ -288,9 +292,6 @@ int git_config_from_file(config_fn_t fn, } else { contents = NULL; config_length = 0; - if (in_fd < 0 && ENOENT != errno ) - die("opening %s: %s", config_file_name, - strerror(errno)); } return ret;