aboutsummaryrefslogtreecommitdiff
path: root/pretty.c
diff options
context:
space:
mode:
Diffstat (limited to 'pretty.c')
-rw-r--r--pretty.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pretty.c b/pretty.c
index 3a1da6fd3..f97a76251 100644
--- a/pretty.c
+++ b/pretty.c
@@ -146,7 +146,7 @@ void get_commit_format(const char *arg, struct rev_info *rev)
struct cmt_fmt_map *commit_format;
rev->use_terminator = 0;
- if (!arg || !*arg) {
+ if (!arg) {
rev->commit_format = CMIT_FMT_DEFAULT;
return;
}
@@ -155,7 +155,7 @@ void get_commit_format(const char *arg, struct rev_info *rev)
return;
}
- if (strchr(arg, '%')) {
+ if (!*arg || strchr(arg, '%')) {
save_user_format(rev, arg, 1);
return;
}