diff options
author | Junio C Hamano <gitster@pobox.com> | 2007-10-03 03:06:02 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-10-03 03:06:02 -0700 |
commit | 66d4035e1099477aa488c24c0c081ee764f85868 (patch) | |
tree | d89d0c1d61e5af45c19c0903d75aed970ffa2220 /commit.h | |
parent | e66273a6abb8e9cd0967d52113e29c8014a255f8 (diff) | |
parent | 9a76adebd6dfe144c3643e7e877fff2b41be5c8e (diff) | |
download | git-66d4035e1099477aa488c24c0c081ee764f85868.tar.gz |
Merge branch 'ph/strbuf'
* ph/strbuf: (44 commits)
Make read_patch_file work on a strbuf.
strbuf_read_file enhancement, and use it.
strbuf change: be sure ->buf is never ever NULL.
double free in builtin-update-index.c
Clean up stripspace a bit, use strbuf even more.
Add strbuf_read_file().
rerere: Fix use of an empty strbuf.buf
Small cache_tree_write refactor.
Make builtin-rerere use of strbuf nicer and more efficient.
Add strbuf_cmp.
strbuf_setlen(): do not barf on setting length of an empty buffer to 0
sq_quote_argv and add_to_string rework with strbuf's.
Full rework of quote_c_style and write_name_quoted.
Rework unquote_c_style to work on a strbuf.
strbuf API additions and enhancements.
nfv?asprintf are broken without va_copy, workaround them.
Fix the expansion pattern of the pseudo-static path buffer.
builtin-for-each-ref.c::copy_name() - do not overstep the buffer.
builtin-apply.c: fix a tiny leak introduced during xmemdupz() conversion.
Use xmemdupz() in many places.
...
Diffstat (limited to 'commit.h')
-rw-r--r-- | commit.h | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -3,6 +3,7 @@ #include "object.h" #include "tree.h" +#include "strbuf.h" #include "decorate.h" struct commit_list { @@ -61,8 +62,12 @@ enum cmit_fmt { }; extern enum cmit_fmt get_commit_format(const char *arg); -extern long format_commit_message(const struct commit *commit, const void *template, char **buf_p, unsigned long *space_p); -extern unsigned long pretty_print_commit(enum cmit_fmt fmt, const struct commit *, unsigned long len, char **buf_p, unsigned long *space_p, int abbrev, const char *subject, const char *after_subject, enum date_mode dmode); +extern void format_commit_message(const struct commit *commit, + const void *format, struct strbuf *sb); +extern void pretty_print_commit(enum cmit_fmt fmt, const struct commit*, + struct strbuf *, + int abbrev, const char *subject, + const char *after_subject, enum date_mode); /** Removes the first commit from a list sorted by date, and adds all * of its parents. |