@matheusbsbs / matheus-bagliano / commits / e88d022af9
Fork 0

improve error message in config.c

Show errno if opening a lockfile fails. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Alex Riesen committed Apr 29, 2009 at 23:27 UTC e88d022af96312e64216bfec31bd6749277c335a
1 file changed +1 -1
config.c
+1 -1
@@ -954,7 +954,7 @@ int git_config_set_multivar(const char* key, const char* value,
954 lock = xcalloc(sizeof(struct lock_file), 1);
955 fd = hold_lock_file_for_update(lock, config_filename, 0);
956 if (fd < 0) {
957 - error("could not lock config file %s", config_filename);
957 + error("could not lock config file %s: %s", config_filename, strerror(errno));
958 free(store.key);
959 ret = -1;
960 goto out_free;