Files
git/builtin
Johannes Schindelin 6ea57703f6 log: prepare log/log-tree to reuse the diffopt.close_file attribute
We are about to teach the log-tree machinery to reuse the diffopt.file
field to output to a file stream other than stdout, in line with the
diff machinery already writing to diffopt.file.

However, we might want to write something after the diff in
log_tree_commit() (e.g. with the --show-linear-break option), therefore
we must not let the diff machinery close the file (as per
diffopt.close_file.

This means that log_tree_commit() itself must override the
diffopt.close_file flag and close the file, and if log_tree_commit() is
called in a loop, the caller is responsible to do the same.

Note: format-patch has an `--output-directory` option. Due to the fact
that format-patch's options are parsed first, and that the parse-options
machinery accepts uniquely abbreviated options, the diff options
`--output` (and `-o`) are shadowed. Therefore close_file is not set to 1
so that cmd_format_patch() does *not* need to handle the close_file flag
differently, even if it calls log_tree_commit() in a loop.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-06-24 13:50:45 -07:00
..
2016-05-09 12:29:08 -07:00
2016-06-03 14:38:04 -07:00
2016-02-26 13:37:16 -08:00
2015-11-20 08:02:05 -05:00
2016-05-17 14:38:28 -07:00
2016-05-06 14:45:44 -07:00
2016-05-09 12:29:08 -07:00
2016-02-10 14:20:08 -08:00
2015-10-21 15:59:34 -07:00
2016-04-25 15:17:15 -07:00
2016-02-26 13:37:16 -08:00
2016-04-29 12:59:07 -07:00
2016-05-17 14:38:28 -07:00
2016-02-26 13:37:25 -08:00
2015-10-05 13:20:08 -07:00
2016-05-17 14:38:28 -07:00
2016-01-28 16:10:14 -08:00
2016-04-29 12:59:09 -07:00
2015-11-20 08:02:05 -05:00