summaryrefslogtreecommitdiff
path: root/builtin-commit.c
diff options
context:
space:
mode:
authorCristian Peraferrer <corellian.c@gmail.com>2008-06-20 17:24:20 +0200
committerJunio C Hamano <gitster@pobox.com>2008-06-21 00:01:37 -0700
commitcdeaf10f7e2754054c7be5d74227c698d2a71890 (patch)
treee6b1da428323dd72d42d29ffeab1f865b1d46a90 /builtin-commit.c
parentae081f3ebd5f65c453051b2db7b83d2a7c280827 (diff)
downloadgit-cdeaf10f7e2754054c7be5d74227c698d2a71890.tar.gz
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>
Diffstat (limited to 'builtin-commit.c')
-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);