summaryrefslogtreecommitdiff
path: root/pretty.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2008-02-27 13:03:50 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2008-02-27 13:03:50 -0800
commit3d0a936f63f2f894b3986d96cdd8f2baae96150c (patch)
treef661256c3756d9d74ea2cd045115e5488f53388f /pretty.c
parentMerge branch 'js/branch-track' (diff)
parentAvoid unnecessary "if-before-free" tests. (diff)
downloadtgif-3d0a936f63f2f894b3986d96cdd8f2baae96150c.tar.xz
Merge branch 'jm/free'
* jm/free: Avoid unnecessary "if-before-free" tests. Conflicts: builtin-branch.c
Diffstat (limited to 'pretty.c')
-rw-r--r--pretty.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/pretty.c b/pretty.c
index a5b2d8c604..703f52176b 100644
--- a/pretty.c
+++ b/pretty.c
@@ -30,8 +30,7 @@ enum cmit_fmt get_commit_format(const char *arg)
if (*arg == '=')
arg++;
if (!prefixcmp(arg, "format:")) {
- if (user_format)
- free(user_format);
+ free(user_format);
user_format = xstrdup(arg + 7);
return CMIT_FMT_USERFORMAT;
}