summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Cristian Peraferrer <corellian.c@gmail.com>2008-06-20 17:24:20 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2008-06-21 00:01:37 -0700
commitcdeaf10f7e2754054c7be5d74227c698d2a71890 (patch)
treee6b1da428323dd72d42d29ffeab1f865b1d46a90
parentAdd target "install-html" the the top level Makefile (diff)
downloadtgif-cdeaf10f7e2754054c7be5d74227c698d2a71890.tar.xz
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 <corellian.c@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--builtin-commit.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin-commit.c b/builtin-commit.c
index 90200ed643..a33f43a209 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);