summaryrefslogtreecommitdiff
path: root/builtin/log.c
diff options
context:
space:
mode:
authorRamkumar Ramachandra <artagnon@gmail.com>2010-08-27 20:28:16 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-08-27 23:47:45 (GMT)
commit2c642ed8668745271a714f0a672dbfcd6b0a6fa8 (patch)
treefa9ad23593a89c3cd89ec8ebd04535a94acb1345 /builtin/log.c
parent6426f2d2afb42e51dac901ff666c3296424c6f5c (diff)
downloadgit-2c642ed8668745271a714f0a672dbfcd6b0a6fa8.zip
git-2c642ed8668745271a714f0a672dbfcd6b0a6fa8.tar.gz
git-2c642ed8668745271a714f0a672dbfcd6b0a6fa8.tar.bz2
format-patch: Don't go over merge commits
If the topmost three commits in a branch were merge commits, 'git format-patch -3' used to output nothing. Since Git can't prepare patches out of merge commits anyway, don't go over them in the first place. 'git format-patch -3' now prepares three patches from the topmost three commits without counting merge commits. Also add a corresponding test in t4014-format-patch and update documentation. Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/log.c')
-rw-r--r--builtin/log.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/builtin/log.c b/builtin/log.c
index 6208703..0093b2d 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -1012,8 +1012,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
rev.commit_format = CMIT_FMT_EMAIL;
rev.verbose_header = 1;
rev.diff = 1;
- rev.combine_merges = 0;
- rev.ignore_merges = 1;
+ rev.no_merges = 1;
DIFF_OPT_SET(&rev.diffopt, RECURSIVE);
rev.subject_prefix = fmt_patch_subject_prefix;
memset(&s_r_opt, 0, sizeof(s_r_opt));
@@ -1184,10 +1183,6 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
continue;
}
- /* ignore merges */
- if (commit->parents && commit->parents->next)
- continue;
-
if (ignore_if_in_upstream &&
has_commit_patch_id(commit, &ids))
continue;