summaryrefslogtreecommitdiff
path: root/pretty.c
diff options
context:
space:
mode:
Diffstat (limited to 'pretty.c')
-rw-r--r--pretty.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/pretty.c b/pretty.c
index 9631529c10..73b5ead509 100644
--- a/pretty.c
+++ b/pretty.c
@@ -671,7 +671,11 @@ const char *repo_logmsg_reencode(struct repository *r,
* If the re-encoding failed, out might be NULL here; in that
* case we just return the commit message verbatim.
*/
- return out ? out : msg;
+ if (!out) {
+ warning("unable to reencode commit to '%s'", output_encoding);
+ return msg;
+ }
+ return out;
}
static int mailmap_name(const char **email, size_t *email_len,