format-patch: tie file-opening logic to output_directory
authorJeff King <redacted>
Wed, 4 Nov 2020 19:28:34 +0000 (14:28 -0500)
committerJunio C Hamano <redacted>
Wed, 4 Nov 2020 22:05:28 +0000 (14:05 -0800)
commit1e1693b2bbaa9613f3a39a35196fc219c25f7677
treeb6c03623f712d2b450187c2b0053e33aee99097a
parent4c6f781f9c7ee7029c3f2fd20ddd76ce8b476bca
format-patch: tie file-opening logic to output_directory

In format-patch we're either outputting to stdout or to individual files
in an output directory (which may be just "./"). Our logic for whether
to open a new file for each patch is checked with "!use_stdout", but it
is equally correct to check for a non-NULL output_directory.

The distinction will matter when we add a new single-stream output in a
future patch, when only one of the three methods will want individual
files. Let's swap the logic here in preparation.

Signed-off-by: Jeff King <redacted>
Signed-off-by: Junio C Hamano <redacted>
builtin/log.c
git clone https://git.99rst.org/PROJECT