]> git.ipfire.org Git - thirdparty/git.git/commit
format-patch: output header for empty commits
authorJohn Keeping <john@keeping.me.uk>
Fri, 3 Mar 2023 16:03:01 +0000 (16:03 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 3 Mar 2023 17:13:52 +0000 (09:13 -0800)
commit94c4289435605a9c39951ccebaf82f131e07c255
tree2e8d86f11250688b184886839c924f93a8336722
parentd15644fe0226af7ffc874572d968598564a230dd
format-patch: output header for empty commits

When formatting an empty commit, it is surprising that a totally empty
file is generated.  Set the flag to always print the header, matching
the behaviour of git-log.

Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/log.c
t/t4014-format-patch.sh