Merge branch 'jk/log-fp-implies-m'
"git log --first-parent -p" showed patches only for single-parent commits on the first-parent chain; the "--first-parent" option has been made to imply "-m". Use "--no-diff-merges" to restore the previous behaviour to omit patches for merge commits. * jk/log-fp-implies-m: doc/git-log: clarify handling of merge commit diffs doc/git-log: move "-t" into diff-options list doc/git-log: drop "-r" diff option doc/git-log: move "Diff Formatting" from rev-list-options log: enable "-m" automatically with "--first-parent" revision: add "--no-diff-merges" option to counteract "-m" log: drop "--cc implies -m" logic
This commit is contained in:
@ -599,8 +599,8 @@ static int show_tree_object(const struct object_id *oid,
|
||||
static void show_setup_revisions_tweak(struct rev_info *rev,
|
||||
struct setup_revision_opt *opt)
|
||||
{
|
||||
if (rev->ignore_merges) {
|
||||
/* There was no "-m" on the command line */
|
||||
if (rev->ignore_merges < 0) {
|
||||
/* There was no "-m" variant on the command line */
|
||||
rev->ignore_merges = 0;
|
||||
if (!rev->first_parent_only && !rev->combine_merges) {
|
||||
/* No "--first-parent", "-c", or "--cc" */
|
||||
@ -732,8 +732,7 @@ static void log_setup_revisions_tweak(struct rev_info *rev,
|
||||
if (!rev->diffopt.output_format && rev->combine_merges)
|
||||
rev->diffopt.output_format = DIFF_FORMAT_PATCH;
|
||||
|
||||
/* Turn -m on when --cc/-c was given */
|
||||
if (rev->combine_merges)
|
||||
if (rev->first_parent_only && rev->ignore_merges < 0)
|
||||
rev->ignore_merges = 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user