diff options
Diffstat (limited to 'rev-list.c')
-rw-r--r-- | rev-list.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/rev-list.c b/rev-list.c index d3c0dd90e3..a4d72af6e0 100644 --- a/rev-list.c +++ b/rev-list.c @@ -41,13 +41,14 @@ struct rev_info revs; static int bisect_list = 0; static int show_timestamp = 0; static int hdr_termination = 0; +static const char *header_prefix; static void show_commit(struct commit *commit) { if (show_timestamp) printf("%lu ", commit->date); - if (*revs.header_prefix) - fputs(revs.header_prefix, stdout); + if (header_prefix) + fputs(header_prefix, stdout); if (commit->object.flags & BOUNDARY) putchar('-'); if (revs.abbrev_commit && revs.abbrev) @@ -322,9 +323,9 @@ int main(int argc, const char **argv) /* The command line has a --pretty */ hdr_termination = '\n'; if (revs.commit_format == CMIT_FMT_ONELINE) - revs.header_prefix = ""; + header_prefix = ""; else - revs.header_prefix = "commit "; + header_prefix = "commit "; } else if (revs.verbose_header) /* Only --header was specified */ |