зеркало из https://github.com/microsoft/git.git
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>
This commit is contained in:
Родитель
ae081f3ebd
Коммит
cdeaf10f7e
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче