{"thread":{"id":"25463","subject":"[BUG] log -m --graph does not work","startedAt":"2010-10-17T20:29:40Z","lastAt":"2010-10-17T20:29:40Z","messageCount":1,"participants":["Jonathan Nieder"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"153679","messageId":"20101017202940.GA4534@burratino","threadId":"25463","inReplyTo":null,"subject":"[BUG] log -m --graph does not work","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-10-17T20:29:40Z","receivedAt":"2010-10-17T20:29:40Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"\"git log\" can pass \"-m\" to the internal diff-tree helper, with\nthe handy result of multiple diffs for a merge, one against\neach parent.  Unfortunately the graph pretty-printer doesn't\nknow what to do with the second diff:\n\n $ git log -m --graph --oneline --shortstat origin/pu\n *   2ee46ba (from a13ef41) Merge branch 'jh/notes-merge' into pu\n |\\\n | |  17 files changed, 3367 insertions(+), 143 deletions(-)\n | |\n | |\n | |\n | |\n | |\n[...]\n\nError out to avoid getting the user's hopes up (unless -c, --cc,\nor --first-parent was supplied, since they work fine).\n\nNoticed-by: Heikki Hokkanen <hoxu@users.sf.net>\nSigned-off-by: Jonathan Nieder <jrnieder@gmail.com>\n---\nThis patch breaks \"git log --ancestry-path --graph -m -p\" even in the\ncases when it sort of works.  It's probably better to go straight to a\nfix without this band-aid.\n\nHints?\n\n revision.c |    4 ++++\n 1 files changed, 4 insertions(+), 0 deletions(-)\n\ndiff --git a/revision.c b/revision.c\nindex b1c1890..80e0cdb 100644\n--- a/revision.c\n+++ b/revision.c\n@@ -1681,6 +1681,10 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, struct s\n \tif (revs->reflog_info && revs->graph)\n \t\tdie(\"cannot combine --walk-reflogs with --graph\");\n \n+\tif (!revs->ignore_merges && revs->graph &&\n+\t    !revs->combine_merges && !revs->first_parent_only)\n+\t\tdie(\"cannot combine -m with --graph\");\n+\n \treturn left;\n }\n \n-- \n1.7.2.3\n"}]}