From cdeaf10f7e2754054c7be5d74227c698d2a71890 Mon Sep 17 00:00:00 2001 From: Cristian Peraferrer Date: Fri, 20 Jun 2008 17:24:20 +0200 Subject: [PATCH] Print errno upon failure to open the COMMIT_EDITMSG file When the COMMIT_EDITMSG cannot be opened, give more information to the user by giving the 'errno' information. Signed-off-by: Cristian Peraferrer Signed-off-by: Junio C Hamano --- builtin-commit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/builtin-commit.c b/builtin-commit.c index 90200ed64..a33f43a20 100644 --- a/builtin-commit.c +++ b/builtin-commit.c @@ -502,7 +502,8 @@ static int prepare_to_commit(const char *index_file, const char *prefix) fp = fopen(git_path(commit_editmsg), "w"); if (fp == NULL) - die("could not open %s", git_path(commit_editmsg)); + die("could not open %s: %s", + git_path(commit_editmsg), strerror(errno)); if (cleanup_mode != CLEANUP_NONE) stripspace(&sb, 0); -- 2.26.2