{"thread":{"id":"13678","subject":"[PATCH] Added the 'errno' on die msg when the attempt to open the COMMIT_EDITMSG file fails.","startedAt":"2008-05-27T00:11:57Z","lastAt":"2008-05-27T00:11:57Z","messageCount":1,"participants":["Cristian Peraferrer"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"77821","messageId":"B09AB9DB-FF7F-4B4A-9080-EB455DD10A96@gmail.com","threadId":"13678","inReplyTo":null,"subject":"[PATCH] Added the 'errno' on die msg when the attempt to open the COMMIT_EDITMSG file fails.","fromName":"Cristian Peraferrer","fromEmail":"corellian.c@gmail.com","sentAt":"2008-05-27T00:11:57Z","receivedAt":"2008-05-27T00:11:57Z","isPatch":true,"sender":{"key":"corellian.c@gmail.com","avatar":"https://gravatar.com/avatar/2784fca61a754ae4ee27f05f2298cae037b282dd31e434f1b95c24a3969e913c?d=mp&s=160"},"body":"I have added the strerror(errno) in the die message when the attempt\nto open the COMMIT_EDITMSG file fails.\n\nSigned-off-by: Cristian Peraferrer <corellian.c@gmail.com>\n---\n  builtin-commit.c |    2 +-\n  1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/builtin-commit.c b/builtin-commit.c\nindex 07872c8..014a406 100644\n--- a/builtin-commit.c\n+++ b/builtin-commit.c\n@@ -500,7 +500,7 @@ static int prepare_to_commit(const char  \n*index_file, const char *prefix)\n\n         fp = fopen(git_path(commit_editmsg), \"w\");\n         if (fp == NULL)\n-               die(\"could not open %s\", git_path(commit_editmsg));\n+               die(\"could not open %s: %s\", git_path(commit_editmsg),  \nstrerror(errno));\n\n         if (cleanup_mode != CLEANUP_NONE)\n                 stripspace(&sb, 0);\n-- \n1.5.5\n"}]}