Re: [PATCH] config: if mtime (or size) of the config file changed since last read, reread it

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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;

-
: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]