{"thread":{"id":"7371","subject":"[PATCH] git-log --reflog -p --full-history: Show commit diffs instead of faked diffs","startedAt":"2007-03-23T20:21:24Z","lastAt":"2007-03-23T20:21:24Z","messageCount":1,"participants":["Johannes Schindelin"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"37838","messageId":"Pine.LNX.4.63.0703232120560.4045@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"7371","inReplyTo":null,"subject":"[PATCH] git-log --reflog -p --full-history: Show commit diffs instead of faked diffs","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-03-23T20:21:24Z","receivedAt":"2007-03-23T20:21:24Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"\nWith `--reflog` and `-p`, git-log will show diffs according to the reflog \nhistory, while adding `--full-history` will produce the true commit diffs.\n\nIn other words, `git-log -g -p HEAD` will show the diff between HEAD@{n+1} \nand HEAD@{n} with each commit HEAD@{n}.\n\nIn contrast, `git-log -g -p --full-history HEAD`, will show the diff \nbetween HEAD@{n}^ and HEAD@{n} with each commit HEAD@{n}.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n revision.c |    3 +++\n 1 files changed, 3 insertions(+), 0 deletions(-)\n\ndiff --git a/revision.c b/revision.c\nindex f23c1d5..edd7dfd 100644\n--- a/revision.c\n+++ b/revision.c\n@@ -1197,6 +1197,7 @@ static struct commit *get_revision_1(struct rev_info *revs)\n \tdo {\n \t\tstruct commit_list *entry = revs->commits;\n \t\tstruct commit *commit = entry->item;\n+\t\tstruct commit_list *parents = commit->parents;\n \n \t\trevs->commits = entry->next;\n \t\tfree(entry);\n@@ -1215,6 +1216,8 @@ static struct commit *get_revision_1(struct rev_info *revs)\n \t\t\t\tcontinue;\n \t\t\tadd_parents_to_list(revs, commit, &revs->commits);\n \t\t}\n+\t\tif (revs->reflog_info && !revs->simplify_history)\n+\t\t\tcommit->parents = parents;\n \t\tif (commit->object.flags & SHOWN)\n \t\t\tcontinue;\n \n-- \n1.5.1.rc1.2356.g2054\n"}]}