From 88d9d45d071379e81e585faa95e4f28414d7d973 Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Wed, 10 Feb 2010 02:11:49 +0100 Subject: git log -p -m: document -m and honor --first-parent git log -p -m is used to show one merge entry per parent, with an appropriate diff; this can be useful when examining histories where full set of changes introduced by a merged branch is interesting, not only the conflicts. This patch properly documents the -m switch, which has so far been mentioned only as a fairly special diff-tree flag. It also makes the code show full patch entry only for the first parent when --first-parent is used. Thus: git log -p -m --first-parent will show the history from the "main branch perspective", while also including full diff of changes introduced by other merged in branches. Signed-off-by: Petr Baudis Signed-off-by: Junio C Hamano --- Documentation/git-log.txt | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Documentation/git-log.txt') diff --git a/Documentation/git-log.txt b/Documentation/git-log.txt index 0e39bb61ee..fb184ba186 100644 --- a/Documentation/git-log.txt +++ b/Documentation/git-log.txt @@ -118,6 +118,15 @@ git log master --not --remotes=*/master:: Shows all commits that are in local master but not in any remote repository master branches. +git log -p -m --first-parent:: + + Shows the history including change diffs, but only from the + "main branch" perspective, skipping commits that come from merged + branches, and showing full diffs of changes introduced by the merges. + This makes sense only when following a strict policy of merging all + topic branches when staying on a single integration branch. + + Discussion ---------- -- cgit v1.2.1