From d28b5d47ab72a91d5090748f8f8baaf6ffa084fc Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Fri, 21 Dec 2012 22:06:01 -0800 Subject: get_patch_filename(): split into two functions The function switched between two operating modes depending on the NULL-ness of its two parameters, as a hacky way to share small part of implementation, sacrificing cleanliness of the API. Implement "fmt_output_subject()" function that takes a subject string and gives the name for the output file, and on top of it, implement "fmt_output_commit()" function that takes a commit and gives the name for the output file. Signed-off-by: Junio C Hamano --- log-tree.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'log-tree.h') diff --git a/log-tree.h b/log-tree.h index c6a944a838..9140f48216 100644 --- a/log-tree.h +++ b/log-tree.h @@ -21,8 +21,7 @@ void log_write_email_headers(struct rev_info *opt, struct commit *commit, void load_ref_decorations(int flags); #define FORMAT_PATCH_NAME_MAX 64 -void get_patch_filename(struct strbuf *buf, - struct commit *commit, const char *subject, - struct rev_info *); +void fmt_output_commit(struct strbuf *, struct commit *, struct rev_info *); +void fmt_output_subject(struct strbuf *, const char *subject, struct rev_info *); #endif -- cgit v1.2.3