DORMANTno replies

[PATCH] Added the 'errno' on die msg when the attempt to open the COMMIT_EDITMSG file fails.

From: Cristian Peraferrer <hidden>
Date: 2016-06-15 22:44:39
Subsystem: the rest · Maintainer: Linus Torvalds

I have added the strerror(errno) in the die message when the attempt
to open the COMMIT_EDITMSG file fails.

Signed-off-by: Cristian Peraferrer <redacted>
---
  builtin-commit.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/builtin-commit.c b/builtin-commit.c
index 07872c8..014a406 100644
--- a/builtin-commit.c
+++ b/builtin-commit.c
@@ -500,7 +500,7 @@ 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);
-- 
1.5.5
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help