David Miller <davem@xxxxxxxxxxxxx> writes: > From: David Miller <davem@xxxxxxxxxxxxx> > Date: Wed, 06 Oct 2010 17:37:14 -0700 (PDT) > >> >> When I ask git to format-patch a commit that is just a file >> permission change, it ends up generating an empty file, not >> even the commit message is included. > > Ok it turns out that the commit in question was a NOP since the file > permissions didn't change. > > But even if the patch is truly empty, format-patch should still give > me the commit message shouldn't it? Probably; we have strongly encouraged people not to commit no-op, so I guess nobody stumbled upon this corner case. Perhaps something like this? builtin/log.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/builtin/log.c b/builtin/log.c index 22d1290..6baba7d 100644 --- a/builtin/log.c +++ b/builtin/log.c @@ -1057,6 +1057,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix) rev.verbose_header = 1; rev.diff = 1; rev.no_merges = 1; + rev.always_show_header = 1; DIFF_OPT_SET(&rev.diffopt, RECURSIVE); rev.subject_prefix = fmt_patch_subject_prefix; memset(&s_r_opt, 0, sizeof(s_r_opt)); -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html