diff options
author | Cristian Peraferrer <corellian.c@gmail.com> | 2008-06-20 17:24:20 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-06-21 00:01:37 -0700 |
commit | cdeaf10f7e2754054c7be5d74227c698d2a71890 (patch) | |
tree | e6b1da428323dd72d42d29ffeab1f865b1d46a90 /builtin-commit.c | |
parent | ae081f3ebd5f65c453051b2db7b83d2a7c280827 (diff) | |
download | git-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.c | 3 |
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); |