]> git.ipfire.org Git - thirdparty/git.git/commit - revision.h
diff-merges: let new options enable diff without -p
authorSergey Organov <sorganov@gmail.com>
Mon, 21 Dec 2020 15:19:53 +0000 (18:19 +0300)
committerJunio C Hamano <gitster@pobox.com>
Mon, 21 Dec 2020 21:47:32 +0000 (13:47 -0800)
commita6d19ecc6b7715b50b0dced7e3d2923a8797df64
treeb6006ef2c22a5e80f455926183584733d4d8357e
parent5733b20f41ac0fecdacdf34a11acef2d03fac829
diff-merges: let new options enable diff without -p

New options don't have any visible effect unless -p is either given or
implied, as unlike -c/-cc we don't imply -p with --diff-merges. To fix
this, this patch adds new functionality by letting new options enable
output of diffs for merge commits only.

Add 'merges_need_diff' field and set it whenever diff output for merges is
enabled by any of the new options.

Extend diff output logic accordingly, to output diffs for merges when
'merges_need_diff' is set even when no -p has been provided.

Signed-off-by: Sergey Organov <sorganov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff-merges.c
log-tree.c
revision.h