format-patch: construct patch filename in one function
commit6df514af9dfb44f104baa9b581e91de22af89b8d
authorStephen Boyd <bebarino@gmail.com>
Mon, 23 Mar 2009 02:14:02 +0000 (22 19:14 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 23 Mar 2009 04:33:04 +0000 (22 21:33 -0700)
treeaa0ba70807f8dbe7803fa3b9ace2cd01391c6efa
parent46d164b0cd1d5d254047d7573c53e368e42bf5e5
format-patch: construct patch filename in one function

reopen_stdout() usually takes the oneline subject of a commit,
appends the patch suffix, prepends the output directory (if any) and
then reopens stdout as the resulting file. Now the patch filename (the
oneline subject and the patch suffix) is created in
get_patch_filename() and passed to reopen_stdout() which prepends the
output directory and reopens stdout as that file.

The original function to get the oneline description,
get_oneline_for_filename(), has been renamed to get_patch_filename() to
reflect its new functionality.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-log.c