{"thread":{"id":"19129","subject":"[PATCH] improve error message in config.c","startedAt":"2009-04-29T21:27:54Z","lastAt":"2009-04-29T21:27:54Z","messageCount":1,"participants":["Alex Riesen"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"112696","messageId":"20090429212754.GB12981@blimp.localdomain","threadId":"19129","inReplyTo":null,"subject":"[PATCH] improve error message in config.c","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2009-04-29T21:27:54Z","receivedAt":"2009-04-29T21:27:54Z","isPatch":true,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"Show errno if opening a lockfile fails.\n\nSigned-off-by: Alex Riesen <raa.lkml@gmail.com>\n---\n\nI miss them error codes greately. Especially when a problem is hard\nto reproduce.\n\n config.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/config.c b/config.c\nindex 1750cfb..8bd953c 100644\n--- a/config.c\n+++ b/config.c\n@@ -996,7 +996,7 @@ int git_config_set_multivar(const char* key, const char* value,\n \tlock = xcalloc(sizeof(struct lock_file), 1);\n \tfd = hold_lock_file_for_update(lock, config_filename, 0);\n \tif (fd < 0) {\n-\t\terror(\"could not lock config file %s\", config_filename);\n+\t\terror(\"could not lock config file %s: %s\", config_filename, strerror(errno));\n \t\tfree(store.key);\n \t\tret = -1;\n \t\tgoto out_free;\n-- \n1.6.3.rc3.39.g49fd5\n"}]}